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

Issue in nc_def_var_extra with shuffle #1720

Closed
gsjaardema opened this issue May 11, 2020 · 1 comment
Closed

Issue in nc_def_var_extra with shuffle #1720

gsjaardema opened this issue May 11, 2020 · 1 comment

Comments

@gsjaardema
Copy link
Contributor

gsjaardema commented May 11, 2020

This may be related to #1713.

I think there are a few errors in nc_def_var_extra with parallel builds.
I am trying to enable the parallel compression feature, and it is always returning an NC_EINVAL from line 673. This happens whether I have shuffle enabled or not.

#ifndef HDF5_SUPPORTS_PAR_FILTERS
    if (h5->parallel == NC_TRUE)
        if (nclistlength(var->filters) > 0  || fletcher32 || shuffle)
            return NC_EINVAL;
#endif

I think the code is checking shuffle and it should be checking *shuffle (Or, check that shuffle is non-NULL and then check the value and return if the value is non-zero)

Note that the call to this routine from NC4_def_var_deflate is:

    if((stat = nc_def_var_extra(ncid, varid, &shuffle, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL))) goto done;

And shuffle is an integer parameter to NC4_def_var_deflate, so &shuffle will always be a non-NULL address, so the test in nc_def_var_extra

The overall behavior is probably the same since this is inside a block only active if the underlying HDF5 doesn't support parallel compression, so eventually the code will return with NC_EINVAL, but it shouldn't be returning that at this point.

@DennisHeimbigner
Copy link
Collaborator

Looks like a correct diagnosis.

@WardF WardF closed this as completed Aug 22, 2024
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

3 participants