mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-02-11 16:40:36 +08:00
now prevent attempt to change to independent access when deflate, shuffle, or fletcher32 filters are in use
This commit is contained in:
parent
8681b0d241
commit
8f8dfac9f6
@ -422,6 +422,13 @@ NC4_var_par_access(int ncid, int varid, int par_access)
|
||||
if (!var) return NC_ENOTVAR;
|
||||
assert(var->hdr.id == varid);
|
||||
|
||||
/* If zlib, shuffle, or fletcher32 filters are in use, then access
|
||||
* must be collective. Fail an attempt to set such a variable to
|
||||
* independent access. */
|
||||
if ((var->deflate || var->shuffle || var->fletcher32) &&
|
||||
par_access == NC_INDEPENDENT)
|
||||
return NC_EINVAL;
|
||||
|
||||
if (par_access)
|
||||
var->parallel_access = NC_COLLECTIVE;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user