Skip to content

Commit

Permalink
added nc_free_decomp
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Jul 5, 2019
1 parent 746f327 commit ff6a067
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/clib/pio.h
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,9 @@ extern "C" {
int maplen, const size_t *compmap, int *ioidp,
int rearranger, const size_t *iostart,
const size_t *iocount);

int nc_free_decomp(int ioid);

#if defined(__cplusplus)
}
#endif
Expand Down
13 changes: 12 additions & 1 deletion src/ncint/ncint_pio.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ nc_free_iosystem(int iosysid)
}

/**
* Same as PIOc_init_decomp()
* Same as PIOc_init_decomp().
*
* @author Ed Hartnett
*/
Expand All @@ -61,3 +61,14 @@ nc_init_decomp(int iosysid, int pio_type, int ndims, const int *gdimlen,
(const PIO_Offset *)iostart,
(const PIO_Offset *)iocount);
}

/**
* Same as PIOc_freedecomp().
*
* @author Ed Hartnett
*/
int
nc_free_decomp(int ioid)
{
return PIOc_freedecomp(diosysid, ioid);
}
3 changes: 3 additions & 0 deletions tests/ncint/tst_pio_udf.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ main(int argc, char **argv)
if (nc_open(FILE_NAME, NC_UDF0, &ncid)) ERR;
if (nc_close(ncid)) ERR;

/* Free the decomposition. */
if (nc_free_decomp(ioid)) ERR;

/* Close the iosystem. */
if (nc_free_iosystem(iosysid)) ERR;
}
Expand Down

0 comments on commit ff6a067

Please sign in to comment.