diff options
author | Vailin Choi <vchoi@hdfgroup.org> | 2016-01-20 23:17:01 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@hdfgroup.org> | 2016-01-20 23:17:01 (GMT) |
commit | 1ede7af7841a9ba323a63f9bda6372274e8092bc (patch) | |
tree | 689f7a2bf706f9ee726b1c31c97906b248c83bc0 /tools/h5format_convert/h5fc_gentest.c | |
parent | c5a58dc53f460a0535e4b083f91eb16d2e3e8e67 (diff) | |
download | hdf5-1ede7af7841a9ba323a63f9bda6372274e8092bc.zip hdf5-1ede7af7841a9ba323a63f9bda6372274e8092bc.tar.gz hdf5-1ede7af7841a9ba323a63f9bda6372274e8092bc.tar.bz2 |
[svn-r28940] Merge revision #28852 from hdf5_1_10_alpha1 to revise_chunks.
This is the fix to downgrade superblock version for the tool h5format_convert so DLS can use 1.8 h5dump
on the converted file.
Tested on jam, platypus, moohan, osx1010test.
Diffstat (limited to 'tools/h5format_convert/h5fc_gentest.c')
-rw-r--r-- | tools/h5format_convert/h5fc_gentest.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tools/h5format_convert/h5fc_gentest.c b/tools/h5format_convert/h5fc_gentest.c index 4dcc286..888aa27 100644 --- a/tools/h5format_convert/h5fc_gentest.c +++ b/tools/h5format_convert/h5fc_gentest.c @@ -172,6 +172,7 @@ gen_latest(const char *fname) { hid_t fid = -1; /* file id */ hid_t fapl = -1; /* file access property list */ + hid_t fcpl = -1; /* file creation property list */ hid_t gid = -1; /* group id */ hid_t sid = -1; /* space id */ hid_t dcpl = -1; /* dataset creation property id */ @@ -188,7 +189,12 @@ gen_latest(const char *fname) if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0) goto error; - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + goto error; + if(H5Pset_shared_mesg_nindexes(fcpl, 4) < 0) + goto error; + + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC, fcpl, fapl)) < 0) goto error; /* Create a group */ @@ -365,6 +371,7 @@ static void gen_non(const char *fname) { hid_t fid = -1; /* file id */ + hid_t fcpl = -1; /* file creation property list */ hid_t gid = -1; /* group id */ hid_t sid = -1; /* space id */ hid_t dcpl = -1; /* dataset creation property id */ @@ -376,8 +383,15 @@ gen_non(const char *fname) int i; /* local index variable */ int buf[24]; /* data buffer */ + if((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0) + goto error; + if(H5Pset_shared_mesg_nindexes(fcpl, 4) < 0) + goto error; + if(H5Pset_istore_k(fcpl, 64) < 0) + goto error; + /* Create a new file with SWMR_WRITE + non-latest-format */ - if((fid = H5Fcreate(fname, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, H5P_DEFAULT, H5P_DEFAULT)) < 0) + if((fid = H5Fcreate(fname, H5F_ACC_TRUNC|H5F_ACC_SWMR_WRITE, fcpl, H5P_DEFAULT)) < 0) goto error; /* Create a group */ |