-
Notifications
You must be signed in to change notification settings - Fork 532
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
Error using dynamic compression plugin #1966
Comments
Another workaround This is fragile so not really a solution, but might work in a containerized environment
The python code then works as expected. This suggests there is some difference between the library packaged with h5p and the one I built the plugin against (I used HDF5 1.12.0 but it's possible this is caused by some variation in compiler or build environment). I might try building the plugin under the manylinux 2010 environment. |
So the underlying issue is the same - if the plugin calls back into the HDF5 API (several plugins do in order to determine chunk size and type information) then it needs to be the same instance of the HDF5 library that h5py is using - so plugins installed system wide that call into the API will not work ( I think the documentation should be updated to reflect this - I am happy to make that change once I've finished my work on this plugin ). I am going to propose a change to the HDF5 plugin mechanism that will mitigate the need to call back into the HDF5 API, but that could take some time as it's not my day job :) |
@planetmarshall Nice work debugging this. The latest h5py wheel is build with 1.12.1, so there's likely some inconsistency between 1.12.0 and 1.12.1. I think the best way to document this (on the h5py side) is to note that if you plan on using custom plugins, you should either: It probably also worth adding a note to the docs that, in general, if you're using multiple projects which link to HDF5, building from source rather than using the prebuild wheels is the best method. |
Summary
An error is reported from a custom compression plugin when I attempt to use it to compress a dataset with h5py
Steps to reproduce:
Build the dynamic plugin and set
HDF5_PLUGIN_PATH
to its location. A minimal plugin is attached.plugin_test.tar.gz
Run the following:
Expected Results
The test HDF5 file should be created successfully
Actual Results
The following stack trace is reported:
Workaround
h5repack-shared
can be used to compress a dataset with the plugin successfullyRelated
I thought it might be related to HDFGroup/hdf5#1009 as the stack trace is similar, but I believe h5py is linked against the shared library?
Using
h5repack
also results in the above error whereash5repack-shared
works as expected. Some sort of linking issue is the likely culprit.The text was updated successfully, but these errors were encountered: