Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

configure fails when default HDF5 plugin dir is used #403

Open
edwardhartnett opened this issue Jun 1, 2023 · 5 comments
Open

configure fails when default HDF5 plugin dir is used #403

edwardhartnett opened this issue Jun 1, 2023 · 5 comments
Assignees
Milestone

Comments

@edwardhartnett
Copy link
Contributor

When netcdf-c is built with --with-plugin-dir (but no value provided) it defaults to using the HDF5 default directory.

But the netcdf-fortran configure does not see this. When I run:

FC=mpifort FCFLAGS=-I/usr/local/netcdf-c-4.9.2_hdf5-1.14.1_mpich/include CPPFLAGS=-I/usr/local/netcdf-c-4.9.2_hdf5-1.14.1_mpich/include LDFLAGS=-L/usr/local/netcdf-c-4.9.2_hdf5-1.14.1_mpich/lib ./configure --prefix=/usr/local/netcdf-fortran-4.6.1_mpich --enable-parallel-tests
I get the message:

configure: WARNING: libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set, so zstd support is not enabled in libnetcdff. Set HDF5_PLUGIN_PATH and re-run configure if you want to enable zstd support.

configure: WARNING: You can use `nc-config --plugindir` to determine the appropriate value for HDF5_PLUGIN_PATH
configure: WARNING: ------------------------------------------
configure: WARNING:  

The plugindir is indeed set to the default HDF5 value:

ed@mikado:~/Downloads/netcdf-fortran-4.6.1$ /usr/local/netcdf-c-4.9.2_hdf5-1.14.1_mpich/bin/nc-config --plugindir
/usr/local/hdf5/lib/plugin

Maybe netcdf-fortran configure should use nc-config to find the value of the plugindir?

@WardF WardF self-assigned this Jun 1, 2023
@WardF WardF added this to the 4.6.2 milestone Jun 1, 2023
@WardF
Copy link
Member

WardF commented Jun 1, 2023

Maybe netcdf-fortran configure should use nc-config to find the value of the plugindir?

I think, in the past, we eventually decided not to automatically rely on nc-config as part of an automated process because there's no guarantee that the first nc-config on the user's path will correspond to the version of libnetcdf being linked against.

The above behavior was added at the last minute to prevent breaking existing workflows, while providing enough information for the savvy user who wants to make use of zstd support to define HDF5_PLUGIN_PATH using the version of nc-config that they specify (or at the very least, are responsible for ensuring is the appropriate one).

This does feels clunky (as I think you've identified, here), and I'm open to refining it.

@coderodyhpc
Copy link

Sorry but I don't understand the proposed solution. I have tried installing hdf5plugin hoping that it might create a specific directory and define HDF5_PLUGIN_PATH but it hasn't fixed the issue. I have 2 questions: (1) How would you use nc-config to overcome this error as suggested by @WardF? (2) I don't know much about zstd other than it is lossless and yields a good compression ratio, but is it really beneficial while working with netCDF? Thanks.
P.S. I'm installing netCDF-fortran from the master branch and netCDF v4.9.2.

@amd-krishnoz
Copy link

amd-krishnoz commented Jan 23, 2024

I have the netcdf-c installed and trying to build netcdf-fortran. I have an hdf5 openmpi installation which is internal despite that make check fails for me. Following is the warning I get while doing configure.

`configure: WARNING: ------------------------------------------
configure: WARNING: libnetcdf was built with zstd support, but HDF5_PLUGIN_PATH is not set, so zstd support is not enabled in libnetcdff. Set HDF5_PLUGIN_PATH and re-run configure if you want to enable zstd support.

configure: WARNING: You can use nc-config --plugindir to determine the appropriate value for HDF5_PLUGIN_PATH
configure: WARNING: ------------------------------------------
`

And make check fails for me with below error. If this could be resolved by manually setting HDF5_PLUGIN_PATH then I would like to know what value it needs to be set since nc-config --plugindir is coming empty for me.

F90-S-0087-Non-constant expression where constant expression required (module_netcdf_nf_data.F90: 167)
F90-S-0087-Non-constant expression where constant expression required (module_netcdf_nf_data.F90: 168)
  0 inform,   0 warnings,   2 severes, 0 fatal for netcdf_nf_data
make[1]: *** [Makefile:766: module_netcdf_nf_data.lo] Error 1
make[1]: Leaving directory '/mnt/share/users/krishnoz/netcdf-fortran-4.6.1/fortran'
make: *** [Makefile:588: check-recursive] Error 1

@WardF
Copy link
Member

WardF commented Jan 23, 2024

Depending on your version of netcdf, you can invoke nc-config --plugindir to discover what plugindir location was specified when compiling netcdf-c.

@amd-krishnoz
Copy link

nc-config --plugindir I get the output as empty for this since netcdf-c is already compiled and bundled with hdf5 for an internal setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants