-
Notifications
You must be signed in to change notification settings - Fork 266
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
netcdf built with hdf5 1.10.8 error after 'nc_def_var_fletcher32' #2189
Comments
Thanks; taking a look at it now, I will also see about getting |
What platform are you observing this failure on? |
Nevermind my question, I see it in the header of the issue you opened, sorry, thanks :) |
Observing this issue on OSX as well. |
In linux with debug and logging turned on, observing the following.
|
For comparison, the following succeeds (netCDF 4.8.1, HDF5 1.8.21)
|
Note to self: Potential resource to follow up on: |
Note to self, I've narrowed this down as a regression between HDF5 |
Confirmation that HDF5 |
From the
|
I'm still taking a look into why this is happening, but the bottom line might be that it might be beyond our control in this circumstance. It should not, however, fail silently. We'll have to put some thought into how we will best handle this at the netcdf layer. |
We could put in a check in nc_def_var_filter so that if one attempts to add a filter to |
@DennisHeimbigner Agreed. I'm uncertain (and can't switch gears at the moment to think about it) whether we want to remove the filter definition when the combination doesn't work and silently proceed, or whether we want to fail with an informative message. The question is whether we want to break a workflow with a message that explains why, or do we want to simply retain previous behavior (one layer up). |
@abhibaruah for what it's worth, it looks like this test may need some alteration on your end, regardless of how we proceed. Any HDF5 version 1.10.7+ is going to (from my testing) result in the behavior you're seeing. |
I interpret the HDF5 release notes to mean that if the filter cannot be applied, then it is now |
Hello Ward and Dennis, I wonder if the erroring behavior with fletcher32 might have been an oversight on the part of hdf5. |
Meanwhile, I have also reached out to the HDF group and forwarded them the link to this discussion. Hopefully, they can help us in identifying next steps for the same, and if the behavior in the hdf5 layer is intended or a bug. |
My suspicion is that other filters do not have a can_apply() function or the function |
You are correct Dennis. She also confirmed that the erroring behavior would be seen only with fletcher32, since the checksum is mandatory. For all other filters, they will be silently ignored when used with variables having variable length datatypes. Here is what Elena wrote: |
So, with reference to the two options in Ward's previous comment, which option will the netcdf library go ahead with? Ignoring the filter and proceeding or failing with a more informative message? |
Frankly, I have no idea how to disentangle this. |
After some discussion, we have decided to treat this an an error. |
re: Unidata#2189 Compression of a variable whose type is variable length fails for all current filters. This is because at some point, the compression buffer will contain pointers to data instead of the actual data. Compression of pointers of course is meaningless. The PR changes the behavior of nc_def_var_filter so that it will fail with error NC_EFILTER if an attempt is made to add a filter to a variable whose type is variable-length. A variable is variable-length if it is of type string or VLEN or transitively (via a compound type) contains a string or VLEN. Also added a test case for this. ## Misc Changes 1. Turn off a number of debugging statements
"Fixed" by #2231 |
re: Discussion Unidata#2554 re: PR Unidata#2231 re: Issue Unidata#2189 After some discussion, the issue of applying filters on variables whose type is not fixed size, was resolved as follows: 1. A call to nc_def_var_filter will ignore such filters, but will issue a log warning. 2. Loading (from an existing file) a variable whose type is not fixed-size and which has filters, will cause the variable to be suppressed. This PR enforces those rules. ### Misc. Other changes * Add a test case to test the vlen change. * Make some minor clean-ups in various cmake and automake files. * Remove unused test
re: PR Unidata#2716). re: Issue Unidata#2189 The basic change is to make use of the fact that HDF5 automatically suppresses optional filters when an attempt is made to apply them to variable-length typed arrays. This means that e.g. ncdump or nccopy will properly see meaningful data. Note that if a filter is defined as HDF5 mandatory, then the corresponding variable will be suppressed and will be invisible to ncdump and nccopy. This functionality is also propagated to NCZarr. This PR makes some minor changes to PR Unidata#2716 as follows: * Move the test for filter X variable-length from dfilter.c down into the dispatch table functions. * Make all filters for HDF5 optional rather than mandatory so that the built-in HDF5 test for filter X variable-length will be invoked. The test case for this was expanded to verify that the filters are defined, but suppressed.
NetCDF version: v4.8.1
OS: Linux 10
Compiler gcc 8.3.0
I am a developer at The MathWorks Inc. For MATLAB, we were building netcdf with hdf5-1.8.12.
However, we are trying to change netcdf's dependency on hdf5 to v1.10.8.
I built netcdf successfully with hdf5 1.10.8. However, while qualifying I started seeing some of our tests fail, which I have narrowed down to an issue with 'nc_def_var_fletcher'.
I am attaching a C repro code below, which works fine when netcdf 4.8.1 is built with hdf5 1.8.12.
However, when netcdf 4.8.1 is built with hdf5 1.10.8, 'nc_close' on line 35 gives the error code -101 (NC_EHDFERR)
The error does not occur if the datatype (xtype) in 'nc_def_var' is anything other than NC_STRING.
Also, the error does not occur if the call to 'nc_def_var_fletcher32' is removed.
Any help in resolving this would be highly appreciated.
The text was updated successfully, but these errors were encountered: