From 100af62ee590399d4cb9a3f6774200a57679b587 Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Wed, 3 Jul 2019 16:08:46 -0600 Subject: [PATCH] further progress on netcdf integration --- configure.ac | 2 +- src/ncint/ncint_pio.c | 11 +++++++++++ tests/ncint/tst_pio_udf.c | 3 +++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index a2f6ce55523..0393b930755 100644 --- a/configure.ac +++ b/configure.ac @@ -278,7 +278,7 @@ fi # These are needed by ncdispatch.h. Only build with HDF5 parallel # versions of netCDF. */ if test "x$enable_netcdf_integration" = xyes; then - AC_SUBST([HDF5_PARALLEL], [1]) + AC_DEFINE([HDF5_PARALLEL],[1],[Does HDF5 library provide parallel access]) fi AM_CONDITIONAL(BUILD_NCINT, [test "x$enable_netcdf_integration" = xyes]) diff --git a/src/ncint/ncint_pio.c b/src/ncint/ncint_pio.c index b53dec882c5..a0a67fdee78 100644 --- a/src/ncint/ncint_pio.c +++ b/src/ncint/ncint_pio.c @@ -21,3 +21,14 @@ nc_init_intracomm(MPI_Comm comp_comm, int num_iotasks, int stride, int base, int { return PIOc_Init_Intracomm(comp_comm, num_iotasks, stride, base, rearr, iosysidp); } + +/** + * Same as PIOc_free_iosystem(). + * + * @author Ed Hartnett + */ +int +nc_free_iosystem(int iosysid) +{ + return PIOc_free_iosystem(iosysid); +} diff --git a/tests/ncint/tst_pio_udf.c b/tests/ncint/tst_pio_udf.c index f0c4617c97c..8280c84dfd4 100644 --- a/tests/ncint/tst_pio_udf.c +++ b/tests/ncint/tst_pio_udf.c @@ -58,6 +58,9 @@ main(int argc, char **argv) if (nc_inq_format(ncid, NULL) != TEST_VAL_42) ERR; if (nc_inq_format_extended(ncid, NULL, NULL) != TEST_VAL_42) ERR; if (nc_abort(ncid) != TEST_VAL_42) ERR; + + /* Close the iosystem. */ + if (nc_free_iosystem(iosysid)) ERR; } SUMMARIZE_ERR;