Unidata / netcdf-cxx4

Official GitHub repository for netCDF-C++ libraries and utilities.
Other
124 stars 49 forks source link

Please clarify H5Free #151

Open VictorEijkhout opened 3 months ago

VictorEijkhout commented 3 months ago
-- Plugin support requires libhdf5 with H5Free support. Your libhdf5 install does not provide H5Free.  Please install a newer version of libhdf5 if you require plugin compression support.
  1. I'm not requesting plugin compression support:

    cmake -D CMAKE_INSTALL_PREFIX=/work2/00434/eijkhout/netcdf/installation-netcdf-4.9.2-stampede3-intel24                     
    -D CMAKE_COLOR_DIAGNOSTICS=OFF                     
    -D CMAKE_VERBOSE_MAKEFILE=ON                     
    -D BUILD_SHARED_LIBS=ON                     
    -DNCDIR=/work2/00434/eijkhout/netcdf/installation-netcdf-4.9.2-stampede3-intel24 
    -DnetCDF_LIBRARIES=/work2/00434/eijkhout/netcdf/installation-netcdf-4.9.2-stampede3-intel24/lib64/libnetcdf.so 
    -DnetCDF_INCLUDE_DIR=/work2/00434/eijkhout/netcdf/installation-netcdf-4.9.2-stampede3-intel24/include                       
    /work2/00434/eijkhout/netcdfx/netcdfx-4.3.1/
  2. What option for netcdf-c do I need?

Victor.

WardF commented 3 months ago

You should be able to pass -DENABLE_PLUGINS=OFF to turn this off.

VictorEijkhout commented 3 months ago

That option applied to? 1. hdf5 2. netcdf-c 3. netcdf-cxx?

VictorEijkhout commented 3 months ago

Actually, that error was caused by:

CMake Error at CMakeLists.txt:405 (CHECK_LIBRARY_EXISTS):
  CHECK_LIBRARY_EXISTS Macro invoked with incorrect arguments for macro
  named: CHECK_LIBRARY_EXISTS

which comes from:

CHECK_LIBRARY_EXISTS(${HDF5_C_LIBRARY_hdf5} H5free_memory "" HAVE_H5FREE_MEMORY)

so apparently that variable is null. Ok, that's a bizarre looking variable, so I define it by hand:

    -D HDF5_C_LIBRARY_hdf5=${TACC_HDF5_LIB}/libhdf5.so 

Why do I have to do this? hdf5 has both .pc and .cmake files but this does not look like a normal naming convention.

Now all that remains is finding the hdf5 include files.

VictorEijkhout commented 3 months ago

And the solution seems to be:

    -D netCDF_INCLUDE_DIR='${TACC_NETCDF_INC};${TACC_HDF5_INC}'