Skip to content

Commit

Permalink
Merge branch 'master' into ejh_more_docs_2
Browse files Browse the repository at this point in the history
  • Loading branch information
edhartnett committed Nov 10, 2017
2 parents 02b66af + a9dde27 commit a416f3e
Show file tree
Hide file tree
Showing 18 changed files with 589 additions and 97 deletions.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ AC_MSG_CHECKING([whether netCDF extra tests should be run (developers only)])
AC_ARG_ENABLE([extra-tests],
[AS_HELP_STRING([--enable-extra-tests],
[enable some extra tests that may not pass because of known issues])])
test "x$enable_extra_tests" = xno || enable_extra_tests=yes
test "x$enable_extra_tests" = xyes || enable_extra_tests=no
AC_MSG_RESULT($enable_extra_tests)
if test "x$enable_extra_tests" = xyes; then
AC_DEFINE([EXTRA_TESTS], [1], [if true, run extra tests which may not work yet])
Expand Down
4 changes: 2 additions & 2 deletions dap4_test/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ test_parse_SOURCES = test_parse.c test_common.h
test_meta_SOURCES = test_meta.c test_common.h
test_data_SOURCES = test_data.c test_common.h
TESTS += test_parse.sh
TESTS += test_meta.sh
TESTS += test_data.sh

if BUILD_UTILITIES
# These rely on ncdump
TESTS += test_raw.sh
TESTS += test_meta.sh
TESTS += test_data.sh
endif

if ENABLE_DAP_REMOTE_TESTS
Expand Down
4 changes: 3 additions & 1 deletion docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ full functionality. (See \ref architecture).
Requirements {#netcdf_requirements}
----------------------------------

* HDF5 1.8.9 or later (for netCDF-4 support)
* For netCDF-4 support
* HDF5 1.8.9 or later.
* HDF5 1.10.1 or later.
* zlib 1.2.5 or later (for netCDF-4 compression)
* curl 7.18.0 or later (for DAP remote access client support)

Expand Down
2 changes: 0 additions & 2 deletions h5_test/tst_h_atts3.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ int
main()
{
printf("\n*** Checking HDF5 attribute functions some more.\n");
#ifdef EXTRA_TESTS
printf("*** Creating tst_xplatform2_3.nc with HDF only...");
{
hid_t fapl_id, fcpl_id;
Expand Down Expand Up @@ -308,6 +307,5 @@ main()
free(vc_out[i].p);
}
SUMMARIZE_ERR;
#endif /* EXTRA_TESTS */
FINAL_RESULTS;
}
2 changes: 0 additions & 2 deletions h5_test/tst_h_atts4.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ int
main()
{
printf("\n*** Checking HDF5 attribute functions for memory leaks.\n");
#ifdef EXTRA_TESTS
printf("*** Checking vlen of compound file...");
{
#define NUM_OBJ_2 2
Expand Down Expand Up @@ -181,6 +180,5 @@ main()
free(vc_out);
}
SUMMARIZE_ERR;
#endif /* EXTRA_TESTS */
FINAL_RESULTS;
}
2 changes: 0 additions & 2 deletions h5_test/tst_h_dimscales.c
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,6 @@ main()
}

SUMMARIZE_ERR;
#ifdef EXTRA_TESTS
printf("*** Checking that unlimited dimscale file can be read...");

{
Expand Down Expand Up @@ -780,6 +779,5 @@ main()
}

SUMMARIZE_ERR;
#endif
FINAL_RESULTS;
}
45 changes: 22 additions & 23 deletions h5_test/tst_h_dimscales1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
but they use HDF5 the same way that netCDF-4 does, so if these
tests don't work, than netCDF-4 won't work either.
$Id: tst_h_dimscales1.c,v 1.2 2010/06/01 15:34:51 ed Exp $
@author Ed Hartnett
*/
#include "h5_err_macros.h"
#include <hdf5.h>
#include <H5DSpublic.h>

#define FILE_NAME "tst_h_dimscales.h5"
#define FILE_NAME "tst_h_dimscales1.h5"
int
main()
{
Expand All @@ -36,52 +36,51 @@ main()
hsize_t dimscale_dims[1] = {DIM1_LEN};

/* Open file and create group. */
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT)) < 0) ERR;
if ((fileid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT,
H5P_DEFAULT)) < 0) ERR;
if ((grpid = H5Gcreate(fileid, GRP_NAME, 0)) < 0) ERR;

/* Create our dimension scale. Use the built-in NAME attribute
* on the dimscale. */
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
dimscale_dims)) < 0) ERR;
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
dimscale_spaceid, H5P_DEFAULT)) < 0) ERR;
if ((dimscale_spaceid = H5Screate_simple(1, dimscale_dims,
dimscale_dims)) < 0) ERR;
if ((dimscaleid = H5Dcreate(grpid, DIMSCALE_NAME, H5T_NATIVE_INT,
dimscale_spaceid, H5P_DEFAULT)) < 0) ERR;
if (H5DSset_scale(dimscaleid, NAME_ATTRIBUTE) < 0) ERR;

/* Create a 1D variable which uses the dimscale. Attach a label
* to this scale. */
if ((var1_spaceid = H5Screate_simple(1, dims, dims)) < 0) ERR;
if ((var1_datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
if ((var1_datasetid = H5Dcreate(grpid, VAR1_NAME, H5T_NATIVE_INT,
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
if (H5DSattach_scale(var1_datasetid, dimscaleid, 0) < 0) ERR;
if (H5DSset_label(var1_datasetid, 0, FIFTIES_SONG) < 0) ERR;

/* Create a 1D variabls that doesn't use the dimension scale. */
if ((var2_datasetid = H5Dcreate(grpid, VAR2_NAME, H5T_NATIVE_INT,
var1_spaceid, H5P_DEFAULT)) < 0) ERR;
if ((var2_datasetid = H5Dcreate(grpid, VAR2_NAME, H5T_NATIVE_INT,
var1_spaceid, H5P_DEFAULT)) < 0) ERR;

/* Create a 2D dataset which uses the scale for one of its
* dimensions. */
if ((var3_spaceid = H5Screate_simple(2, dims, dims)) < 0) ERR;
if ((var3_datasetid = H5Dcreate(grpid, VAR3_NAME, H5T_NATIVE_INT,
var3_spaceid, H5P_DEFAULT)) < 0) ERR;
if ((var3_datasetid = H5Dcreate(grpid, VAR3_NAME, H5T_NATIVE_INT,
var3_spaceid, H5P_DEFAULT)) < 0) ERR;
if (H5DSattach_scale(var3_datasetid, dimscaleid, 0) < 0) ERR;

/* Detach the scale. */
if (H5DSdetach_scale(var3_datasetid, dimscaleid, 0) < 0) ERR;

/* Close up the shop. */
if (H5Dclose(dimscaleid) < 0 ||
H5Dclose(var1_datasetid) < 0 ||
H5Dclose(var2_datasetid) < 0 ||
H5Dclose(var3_datasetid) < 0 ||
H5Sclose(var1_spaceid) < 0 ||
H5Sclose(var3_spaceid) < 0 ||
H5Sclose(dimscale_spaceid) < 0 ||
H5Dclose(var1_datasetid) < 0 ||
H5Dclose(var2_datasetid) < 0 ||
H5Dclose(var3_datasetid) < 0 ||
H5Sclose(var1_spaceid) < 0 ||
H5Sclose(var3_spaceid) < 0 ||
H5Sclose(dimscale_spaceid) < 0 ||
H5Gclose(grpid) < 0 ||
H5Fclose(fileid) < 0) ERR;
H5Fclose(fileid) < 0) ERR;
}
SUMMARIZE_ERR;
FINAL_RESULTS;
}

9 changes: 6 additions & 3 deletions libdispatch/dfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -1239,10 +1239,13 @@ nc_close(int ncid)
#endif
{

stat = ncp->dispatch->close(ncid);
stat = ncp->dispatch->close(ncid);
/* Remove from the nc list */
del_from_NCList(ncp);
free_NC(ncp);
if (!stat)
{
del_from_NCList(ncp);
free_NC(ncp);
}
}
return stat;
}
Expand Down
Loading

0 comments on commit a416f3e

Please sign in to comment.