NOTE: The netcdf-porting
mailing list is no longer active. The list archives are made available for historical reasons.
Hi, I've recently added NetCDF as a sub package to a finite element library I maintain: http://libmesh.sf.net I have had to make a few small changes, which I hope will be incorporated upstream. The issues are: (1) older versions of HDF5 do not define H5F_LIBVER_18. Is H5F_LIBVER_LATEST suitable? For the HDF5 that comes with CentOS 6, for example, H5F_LIBVER_18 is not defined. (2) there is no make rule for crest.c or ctest64.c when BUILD_TESTSETS is not defined, hence it is not possible to do a 'make dist' following a 'make clean' in this configuration. This is fixed by defining the rule outside the AM_CONDITIONAL. (3) also, file libdispatch/ncaux.c in the source distributions has DOS line-endings, and I had to run dos2unix on it in order for Solaris Studio to compile it. The below patch below implements my 'fixes' for issues #1 & #2. Thanks, -Ben diff --git a/contrib/netcdf/4.2.1.1/h5_test/tst_h_dimscales4.c b/contrib/netcdf/4.2.1.1/h5_test/tst_h_dimscales4.c index fae8aaa..e8f7240 100644 --- a/contrib/netcdf/4.2.1.1/h5_test/tst_h_dimscales4.c +++ b/contrib/netcdf/4.2.1.1/h5_test/tst_h_dimscales4.c @@ -13,6 +13,11 @@ #include <H5DSpublic.h> #include <ncdimscale.h> +/* BSK - compatibility fix for at least hdf5-1.8.5.patch1-5.el6.x86_64 */ +#ifndef H5F_LIBVER_18 +# define H5F_LIBVER_18 H5F_LIBVER_LATEST +#endif + #define FILE_NAME "tst_h_dimscales4.h5" #define DIMSCALE_NAME "AAA_dimscale" #define VAR1_NAME "Watson" diff --git a/contrib/netcdf/4.2.1.1/libsrc4/nc4file.c b/contrib/netcdf/4.2.1.1/libsrc4/nc4file.c index bea85d8..9401470 100644 --- a/contrib/netcdf/4.2.1.1/libsrc4/nc4file.c +++ b/contrib/netcdf/4.2.1.1/libsrc4/nc4file.c @@ -286,7 +286,11 @@ nc4_create_file(const char *path, int cmode, MPI_Comm comm, MPI_Info info, LOG((4, "nc4_create_file: set HDF raw chunk cache to size %d nelems %d preemption %f", nc4_chunk_cache_size, nc4_chunk_cache_nelems, nc4_chunk_cache_preemption)); #endif /* USE_PARALLEL */ - + + /* BSK - compatibility fix for at least hdf5-1.8.5.patch1-5.el6.x86_64 */ + #ifndef H5F_LIBVER_18 + # define H5F_LIBVER_18 H5F_LIBVER_LATEST + #endif if (H5Pset_libver_bounds(fapl_id, H5F_LIBVER_18, H5F_LIBVER_18) < 0) BAIL(NC_EHDFERR); diff --git a/contrib/netcdf/4.2.1.1/ncdump/Makefile.am b/contrib/netcdf/4.2.1.1/ncdump/Makefile.am index 285bdb3..60efdcf 100644 --- a/contrib/netcdf/4.2.1.1/ncdump/Makefile.am +++ b/contrib/netcdf/4.2.1.1/ncdump/Makefile.am @@ -82,7 +82,14 @@ TESTS += tst_ncgen4.sh endif #endif -endif BUILD_TESTSETS +else # when BUILD_TESTSETS is false, we still need this rule +ctest.c: + cp $(top_srcdir)/ncdump/ref_ctest.c $(top_srcdir)/ncdump/ctest.c + +ctest64.c: + cp $(top_srcdir)/ncdump/ref_ctest64.c $(top_srcdir)/ncdump/ctest64.c + +endif BUILD_TESTSETS_FALSE CLEANFILES = test0.nc test1.cdl test1.nc test2.cdl ctest1.cdl ctest.c \ ctest64.c ctest0.nc ctest0_64.nc c1.cdl ctest1_64.cdl c0.nc small.nc \
netcdf-porting
archives: