/*
* Create a file with fapl setting (A): (H5F_LIBVER_EARLIEST, H5F_LIBVER_V18).
* Create a chunked dataset in the file with “no filter edge chunks”, which
* is introduced in library release 1.10.
* The first attempt to create the dataset should fail with fapl setting (A).
* Switch the fapl setting to (B): (H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST).
* The second attempt to create the dataset should succeed with fapl setting (B).
*/
/* Create a file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
/* Set the fapl */
H5Pset_libver_bounds(fapl, H5F_LIBVER_EARLIEST, H5F_LIBVER_V18);
/* Create a file with this fapl */
fid = H5Fcreate(FILE8, H5F_ACC_TRUNC, H5P_DEFAULT, fapl);
/* Set up to create a chunked dataset with “no filter edge chunks” enabled */
sid = H5Screate_simple(2, fix_dims2, NULL);
dcpl = H5Pcreate(H5P_DATASET_CREATE);
H5Pset_chunk(dcpl, 2, fix_chunks2);
H5Pset_chunk_opts(dcpl, H5D_CHUNK_DONT_FILTER_PARTIAL_CHUNKS);
/* Should fail in creating the dataset */
did = H5Dcreate2(fid, “DSETA”, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
:
:
/* Switch the fapl setting to (H5F_LIBVER_EARLIEST, H5F_LIBVER_LATEST) for this opened file. */
H5Fset_libver_bounds(fid, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST);
/* Should succeed in creating the dataset */
did = H5Dcreate2(fid, “DSETA”, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
: