Skip to content

Commit

Permalink
working now I think
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Dec 15, 2018
1 parent 87e57b5 commit 6bbc245
Show file tree
Hide file tree
Showing 5 changed files with 257 additions and 110 deletions.
6 changes: 4 additions & 2 deletions src/clib/pio_darray.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ int PIOc_write_darray_multi(int ncid, const int *varids, int ioid, int nvars,
{
if (!(tmparray = malloc(arraylen*nvars*iodesc->piotype_size)))
return pio_err(ios, NULL, PIO_ENOMEM, __FILE__, __LINE__);
pio_sorted_copy(array, tmparray, iodesc, nvars);
pio_sorted_copy(array, tmparray, iodesc, nvars, 0);
}
else
{
Expand Down Expand Up @@ -890,6 +890,8 @@ int PIOc_read_darray(int ncid, int varid, int ioid, PIO_Offset arraylen,
{
if (!(tmparray = malloc(iodesc->piotype_size*iodesc->maplen)))
return pio_err(ios, NULL, PIO_ENOMEM, __FILE__, __LINE__);
for(int m=0; m<iodesc->maplen;m++)
((int *) array)[m] = -1;
}
else
tmparray = array;
Expand All @@ -900,7 +902,7 @@ int PIOc_read_darray(int ncid, int varid, int ioid, PIO_Offset arraylen,

if (iodesc->needssort)
{
pio_sorted_copy(tmparray, array, iodesc, 1);
pio_sorted_copy(tmparray, array, iodesc, 1, 1);
free(tmparray);
}

Expand Down
Loading

0 comments on commit 6bbc245

Please sign in to comment.