now prevent attempt to change to independent access when deflate, shuffle, or fletcher32 filters are in use
@@ -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
