- Created by Barbara Jones, last modified on Jul 25, 2019
H5P_SET_LIBVER_BOUNDS
Controls the range of library release versions used when creating objects in a file
Procedure:
H5P_SET_LIBVER_BOUNDS ( fapl_id, low, high )
Signature:
herr_t H5Pset_libver_bounds(
hid_t fapl_id,
H5F_libver_t low,
H5F_libver_t high
)
Fortran90 Interface: h5pset_libver_bounds_f
SUBROUTINE h5pset_libver_bounds_f(fapl_id, low, high, hdferr)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: fapl_id
! File access property list identifier
INTEGER, INTENT(IN) :: low ! The earliest version of the library that
! will be used for writing objects.
! Currently, low must be either:
! H5F_LIBVER_EARLIEST_F
! H5F_LIBVER_LATEST_F
INTEGER, INTENT(IN) :: high
! The latest version of the library that will be
! used for writing objects.
! Currently, high must set to:
! H5F_LIBVER_LATEST_F
INTEGER, INTENT(OUT) :: hdferr
! Error code
! 0 on success and -1 on failure
END SUBROUTINE h5pset_libver_bounds_f
Parameters:
hid_t fapl_id | IN: File access property list identifier |
H5F_libver_t low | IN: The earliest version of the library that will be used for writing objects |
H5F_libver_t high | IN: The latest version of the library that will be used for writing objects |
Description:
H5P_SET_LIBVER_BOUNDS controls the range of library release versions that will be used when creating objects in a file. The object format versions are determined indirectly from the library release versions specified in the call.
This property is set in the file access property list specified by the parameter fapl_id
.
The parameter low
sets the earliest possible format versions that the library will use when creating objects in the file. Note that earliest possible is different from earliest, as some features introduced in library versions later than 1.0.0 resulted in updates to object formats. The parameter high
sets the latest format versions that the library will be allowed to use when creating objects in the file.
The parameters low
and high
must be one of the enumerated values in the H5F_libver_t struct, which is defined in H5Fpublic.h:
typedef enum H5F_libver_t {
H5F_LIBVER_EARLIEST,
H5F_LIBVER_V18 = 1,
H5F_LIBVER_V110 = 2,
H5F_LIBVER_NBOUNDS
} H5F_libvert_t;
#define H5F_LIBVER_LATEST H5F_LIBVER_V110
The macro H5F_LIBVER_LATEST is aliased to the highest enumerated value in H5F_libver_t, indicating that this is currently the latest format available.
The library supports the following five pairs of (low
, high
) combinations as derived from the above values in H5F_libver_t:
Value of low and high | Result |
---|---|
|
|
|
|
|
|
|
|
|
|
Returns:
Returns a non-negative value if successful; otherwise returns a negative value.
Example:
/*
* Create a file with fapl setting (H5F_LIBVER_V18, H5F_LIBVER_LATEST).
* Create a chunked dataset in the file with “no filter edge chunks”, which
* is introduced in library release 1.10.
*/
/* Create a file access property list */
fapl = H5Pcreate(H5P_FILE_ACCESS);
/* Set the fapl */
H5Pset_libver_bounds(fapl, H5F_LIBVER_V18, H5F_LIBVER_LATEST);
/* 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 succeed in creating this dataset */
did = H5Dcreate2(fid, “DSETA”, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl, H5P_DEFAULT);
/*
* If you create the file with fapl setting (H5F_LIBVER_EARLIEST, H5F_LIBVER_V18),
* the creation of the same dataset will fail.
*/
:
:
:
History:
Release | Change |
---|---|
1.10.2 | Add H5F_LIBVER_V18 to the enumerated defines in H5F_libver_t. |
1.8.0 | Function introduced in this release. |
--- Last Modified: July 25, 2019 | 01:57 PM