-
Notifications
You must be signed in to change notification settings - Fork 262
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
zstandard filter is not built or installed? #2294
Comments
I am home from a week off and wading through emails; I will return to this as I review the others, in the meantime, @DennisHeimbigner any thoughts? |
This problem is with current main, correct? |
I just built the main branch and ran the test that exercises various filters and it seems to Did you look at the output of configure to see if it found libzstd? |
It found libzstd. Could it be that you already have the zstandard filter installed in your HDF5 filter path? ;-) |
I guess I assumed you had set HDF5_PLUGIN_PATH to point to your own directory |
Well imagine the poor netCDF user who has never heard of HDF5 plugins but wants to use this new compression. It won't work! :-) So we need to build the zstandard filter, and install it in HDF5_PLUGIN_PATH, or else the nc_def_var_zstandard() function cannot work. This is what CCR does. It's easy and works fine. Then the user just installs netcdf-c, and they can start using nc_def_var_zstandard(). Also, if some other user sends them a netCDF file with zstandard compression, it will not be readable. In order for zstandard to be readable to all users, like zlib, we must also install the filter in HDF5_PLUGIN_PATH. |
I am lost. Let me make sure that I understand,
Correct? |
No I do not have the HDF5 filter wrapper installed. This is a fresh machine. So I install zlib and zstandard with apt-get, and build HDF5. When netcdf-c is built, zstandard is found and built. But when I try to use it, I get a filter not found error. |
What is the value of HDF5_PLUGIN_PATH ? |
I think I get it. You want to bypass the HDF5_PLUGIN_PATH altogether, right? |
What CCR does is include this self-contained autoconf project: This builds the code here: https://github.com/ccr/ccr/blob/master/hdf5_plugins/ZSTANDARD/src/H5Zzstandard.c This generates the plugin shared library for zstandard. During testing, CCR manipulates the HDF5_PLUGIN_PATH to get the tests to work. During install, the plugin is installed in HDF5_PLUGIN_DIR. Once that is done, then of course netcdf-c can use the zstandard plugin. But without the plugin, putting zstandard into netCDF is incomplete. IIRC you have a copy of the bzip filter code, you could just do the same for the zstandard. Then install them in HDF5_PLUGIN_DIR, and everything will magically work for readers and writers. |
I did some experimenting with this idea. One problem that crops up
so that a specific install location is defined. |
Another point. In order to protect the user, I would propose |
I agree with the extra option. CCR has an option:
As for not overwriting, OK, if you want, but I note we don't apply that rule to any other binary in the package. That is, we will happily install our netcdf.so file on top of an existing one, without even warning the user. When they do a "make install" they get it installed, and we trust they know what they are doing. |
@DennisHeimbigner do you want me to make a PR or are you going to do it? I sense that @WardF wants to release soon, so we should get this done. It needs to be in the next release... |
re: Unidata#2294 Ed Hartnett suggested that the netcdf library installation process be extended to install the standard filters into a user specified location. The user can then set HDF5_PLUGIN_PATH to that location. This PR provides that capability using: ```` configure option: --with-plugin-dir=<absolute directory path> cmake option: -DPLUGIN_INSTALL_DIR=<absolute directory path> ```` Currently, the following plugins are always installed, if available: bzip2, zstd, blosc. If NCZarr is enabled, then additional plugins are installed: fletcher32, shuffle, deflate, szip. Additionally, the necessary codec support is installed for each of the above filters that is installed. ## Changes: 1. Cleanup handling of built-in bzip2. 2. Add documentation to docs/filters.md 3. Re-factor the NCZarr codec libraries 4. Add a test, although it can only be exercised after the library is installed, so it cannot be used during normal testing. 5. Cleanup use of HDF5_PLUGIN_PATH in the filter test cases.
…ript re: Unidata#2338 re: Unidata#2294 In issue Unidata#2338, Ed Hartnett suggested a better way to install filters to a user defined location -- for Automake, anyway. This PR implements that suggestion. It turns out to be more complicated than it appears, so there are fair number of changes; mostly to shell scripts. Most of the change is in plugins/Makefile.am. NOTE: this PR still does NOT address the use of HDF5_PLUGIN_PATH as the default; this turns out to be complex when dealing with NCZarr. So this will be addressed in a subsequent post 4.9.0 PR. ## Misc. Changes 1. Record the occurrences of incomplete codecs in libnczarr so that they can be included in _Codecs attribute correctly. This allows users to see what missing filters are referenced in the Zarr file. Primarily affects libnczarr/zfilter.[ch]. Also required creating a new no-effect filter: H5Zunknown.c. 2. Move the unknown filter test to a separate test file. 3. Incorporates PR Unidata#2343
I'm coming from the outside, but it seems you are considering setting |
One problem for us is that until HDF5 version 1.13 is in very general use, |
1.13 is not required for this functionality. |
The plugin interface might even be available in HDF5 1.8 series: |
I stand corrected about the append operation.
Remember that the issue is being able to pass the path info |
I think retaining the first option is a good idea, as we've already started down that route. Adding additional options (to the extent it remains practical) is a great idea, but I'm hesitant to remove ones we have introduced. |
OK, I am going to close this issue. The zstd filter is built and installed correctly, although the user still has to know what to do with HDF5_PLUGIN_PATH if they install plugins somewhere other than the HDF5 default directory. |
I just tried to add a test for zstandard to the code. But it fails.
It turns out that we are not building and installing the zstandard filter code itself. This is a small C program that we must compile and install on the users system, or else zstandard cannot work for them.
We build (but do not install) the bzip2 filter.
We need to build the zstandard one as well.
And we should install both filters in the HDF5 filter directory, so that netCDF can use them.
@WardF I believe this should be resolved before the release.
As it is now, the zstandard feature is non-functional. Users would still have to install CCR to use it (because CCR builds and installs the filter code). So this makes putting zstandard in netCDF pretty pointless. ;-)
The text was updated successfully, but these errors were encountered: