diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2020-02-10 20:11:36 (GMT) |
---|---|---|
committer | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2020-02-10 21:30:18 (GMT) |
commit | 79c62f9a25906705735efa9286124c0d3aa9276a (patch) | |
tree | 03e4cedbfdb8811da3398bee0dca0742ac410f18 /fortran/src | |
parent | e5ae3101095db4b57fedf120c1dadbc257dd92c3 (diff) | |
download | hdf5-79c62f9a25906705735efa9286124c0d3aa9276a.zip hdf5-79c62f9a25906705735efa9286124c0d3aa9276a.tar.gz hdf5-79c62f9a25906705735efa9286124c0d3aa9276a.tar.bz2 |
HDFFV-11018 Add Fortran H5F_LIBVER_V*_F definitions
Added
------
New Definitions:
INTEGER :: H5F_LIBVER_ERROR_F
INTEGER :: H5F_LIBVER_NBOUNDS_F
INTEGER :: H5F_LIBVER_V18_F
INTEGER :: H5F_LIBVER_V110_F
INTEGER :: H5F_LIBVER_V112_F
INTEGER :: H5F_LIBVER_V114_F
New API:
h5pget_libver_bounds_f(fapl_id, low, high, hdferr)
Removed:
call to C wrapper h5pset_libver_bounds_c in h5pset_libver_bounds_f
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Pf.c | 40 | ||||
-rw-r--r-- | fortran/src/H5Pff.F90 | 95 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 8 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 10 | ||||
-rw-r--r-- | fortran/src/H5f90global.F90 | 12 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 1 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 1 |
7 files changed, 104 insertions, 63 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 2cacc8c..a931903 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -4061,46 +4061,6 @@ h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags) ret_value = 0; return ret_value; } -/****if* H5Pf/h5pset_libver_bounds_c - * NAME - * h5pset_libver_bounds_c - * PURPOSE - * Calls H5Pset_libver_bounds - * - * INPUTS - * - * fapl_id - File access property list identifier - * low - The earliest version of the library that will be used for writing objects. - * high - The latest version of the library that will be used for writing objects. - * OUTPUTS - * - * - * RETURNS - * 0 on success, -1 on failure - * AUTHOR - * M. Scot Breitenfeld - * February 18, 2008 - * HISTORY - * - * SOURCE -*/ -int_f -h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high ) -/******/ -{ - int ret_value = -1; - herr_t ret; - - /* - * Call H5Pset_libver_bounds function. - */ - ret = H5Pset_libver_bounds( (hid_t)*fapl_id, (H5F_libver_t)*low, (H5F_libver_t)*high ); - if (ret < 0) return ret_value; - - ret_value = 0; - return ret_value; -} - /****if* H5Pf/h5pset_link_creation_order_c * NAME * h5pset_link_creation_order_c diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90 index 0c0500d..61d30b8 100644 --- a/fortran/src/H5Pff.F90 +++ b/fortran/src/H5Pff.F90 @@ -4754,6 +4754,65 @@ CONTAINS END SUBROUTINE h5pget_attr_creation_order_f +!****s* H5P/H5Pget_libver_bounds_f +! NAME +! H5Pget_libver_bounds_f +! +! PURPOSE +! Retrieves the lower and upper bounds on the HDF5 library release versions that indirectly +! determine the object format versions used when creating objects in the file. +! +! INPUTS +! +! fapl_id - File access property list identifier +! low - The earliest version of the library that will be used for writing objects. +! high - The latest version of the library that will be used for writing objects. +! +! OUTPUTS +! +! hdferr - error code +! Success: 0 +! Failure: -1 +! +! AUTHOR +! M. Scot Breitenfeld +! February 10, 2020 +! +! Fortran Interface: + SUBROUTINE h5pget_libver_bounds_f(fapl_id, low, high, hdferr) + IMPLICIT NONE + INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier + INTEGER, INTENT(OUT) :: low ! The earliest version of the library that will be used for writing objects. + INTEGER, INTENT(OUT) :: high ! The latest version of the library that will be used for writing objects. + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure +!***** +! Local variables + INTEGER(ENUM_T) :: low_c, high_c + INTEGER(C_INT) :: hdferr_c +! +! MS FORTRAN needs explicit interface for C functions called here. +! + INTERFACE + INTEGER(C_INT) FUNCTION h5pget_libver_bounds(fapl_id, low, high) & + BIND(C,NAME='H5Pget_libver_bounds') + IMPORT :: C_INT, HID_T, ENUM_T + IMPLICIT NONE + INTEGER(HID_T) , INTENT(IN) , VALUE :: fapl_id + INTEGER(ENUM_T), INTENT(OUT) :: low + INTEGER(ENUM_T), INTENT(OUT) :: high + END FUNCTION h5pget_libver_bounds + END INTERFACE + + hdferr_c = H5Pget_libver_bounds(fapl_id, low_c, high_c) + + low = INT(low_c) + high = INT(high_c) + + hdferr = 0 + IF(hdferr_c.LT.0) hdferr = -1 + + END SUBROUTINE h5pget_libver_bounds_f + !****s* H5P/H5Pset_libver_bounds_f ! NAME ! H5Pset_libver_bounds_f @@ -4781,32 +4840,30 @@ CONTAINS 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 one of two pre-defined values: - ! HDF_LIBVER_EARLIEST_F - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. - ! Currently, low must set to the pre-defined value: - ! HDF_LIBVER_LATEST_F - INTEGER, INTENT(OUT) :: hdferr ! Error code - ! 0 on success and -1 on failure -!***** + INTEGER, INTENT(IN) :: low ! The earliest version of the library that will be used for writing objects. + INTEGER, INTENT(IN) :: high ! The latest version of the library that will be used for writing objects. + INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success and -1 on failure +!***** +! Local variables + INTEGER(C_INT) :: hdferr_c ! ! MS FORTRAN needs explicit interface for C functions called here. ! INTERFACE - INTEGER FUNCTION h5pset_libver_bounds_c(fapl_id, low, high) & - BIND(C,NAME='h5pset_libver_bounds_c') - IMPORT :: HID_T + INTEGER(C_INT) FUNCTION h5pset_libver_bounds(fapl_id, low, high) & + BIND(C,NAME='H5Pset_libver_bounds') + IMPORT :: C_INT, HID_T, ENUM_T IMPLICIT NONE - INTEGER(HID_T), INTENT(IN) :: fapl_id - INTEGER, INTENT(IN) :: low - INTEGER, INTENT(IN) :: high - - END FUNCTION H5pset_libver_bounds_c + INTEGER(HID_T), INTENT(IN), VALUE :: fapl_id + INTEGER(ENUM_T), INTENT(IN), VALUE :: low + INTEGER(ENUM_T), INTENT(IN), VALUE :: high + END FUNCTION h5pset_libver_bounds END INTERFACE - hdferr = h5pset_libver_bounds_c(fapl_id, low, high) + hdferr_c = h5pset_libver_bounds(fapl_id, INT(low, ENUM_T), INT(high, ENUM_T)) + + hdferr = 0 + IF(hdferr_c.LT.0) hdferr = -1 END SUBROUTINE h5pset_libver_bounds_f diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 132da7b..ced5049 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -441,7 +441,13 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, h5f_flags[15] = (int_f)H5F_OBJ_ALL; h5f_flags[16] = (int_f)H5F_LIBVER_EARLIEST; h5f_flags[17] = (int_f)H5F_LIBVER_LATEST; - h5f_flags[18] = (int_f)H5F_UNLIMITED; + h5f_flags[18] = (int_f)H5F_LIBVER_ERROR; + h5f_flags[19] = (int_f)H5F_LIBVER_NBOUNDS; + h5f_flags[20] = (int_f)H5F_UNLIMITED; + h5f_flags[21] = (int_f)H5F_LIBVER_V18; + h5f_flags[22] = (int_f)H5F_LIBVER_V110; + h5f_flags[23] = (int_f)H5F_LIBVER_V112; + h5f_flags[24] = (int_f)H5F_LIBVER_V114; /* * H5FD flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 443be79..7c7c751 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -46,7 +46,7 @@ MODULE H5LIB ! ! H5F flags declaration ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19 + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 25 INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags ! ! H5generic flags declaration @@ -343,7 +343,13 @@ CONTAINS H5F_OBJ_ALL_F = H5F_flags(16) H5F_LIBVER_EARLIEST_F = H5F_flags(17) H5F_LIBVER_LATEST_F = H5F_flags(18) - H5F_UNLIMITED_F = H5F_flags(19) + H5F_LIBVER_ERROR_F = H5F_flags(19) + H5F_LIBVER_NBOUNDS_F = H5F_flags(20) + H5F_UNLIMITED_F = H5F_flags(21) + H5F_LIBVER_V18_F = H5F_flags(22) + H5F_LIBVER_V110_F = H5F_flags(23) + H5F_LIBVER_V112_F = H5F_flags(24) + H5F_LIBVER_V114_F = H5F_flags(25) ! ! H5generic flags ! diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index dabc0bb..6b601e9 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -237,6 +237,12 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_EARLIEST_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_LATEST_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_UNLIMITED_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_ERROR_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_NBOUNDS_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V18_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F !DEC$endif INTEGER :: H5F_ACC_RDWR_F @@ -258,6 +264,12 @@ MODULE H5GLOBAL INTEGER :: H5F_LIBVER_EARLIEST_F INTEGER :: H5F_LIBVER_LATEST_F INTEGER :: H5F_UNLIMITED_F + INTEGER :: H5F_LIBVER_ERROR_F + INTEGER :: H5F_LIBVER_NBOUNDS_F + INTEGER :: H5F_LIBVER_V18_F + INTEGER :: H5F_LIBVER_V110_F + INTEGER :: H5F_LIBVER_V112_F + INTEGER :: H5F_LIBVER_V114_F ! ! H5G flags declaration ! diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index e6f5dd4..fe616d3 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -454,7 +454,6 @@ H5_FCDLL int_f h5pset_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_f H5_FCDLL int_f h5pset_shared_mesg_nindexes_c(hid_t_f *plist_id, int_f *nindexes ); H5_FCDLL int_f h5pset_shared_mesg_index_c(hid_t_f *fcpl_id, int_f *index_num, int_f *mesg_type_flags, int_f *min_mesg_size); H5_FCDLL int_f h5pget_attr_creation_order_c(hid_t_f *ocpl_id, int_f *crt_order_flags); -H5_FCDLL int_f h5pset_libver_bounds_c(hid_t_f *fapl_id, int_f *low, int_f *high); H5_FCDLL int_f h5pset_link_creation_order_c(hid_t_f *gcpl_id, int_f *crt_order_flags); H5_FCDLL int_f h5pget_link_phase_change_c(hid_t_f *gcpl_id, int_f *max_compact, int_f *min_dense ); H5_FCDLL int_f h5pget_obj_track_times_c(hid_t_f *plist_id, int_f *flag); diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in index c792232..9c69e5a 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -288,6 +288,7 @@ H5P_mp_H5PSET_ATTR_CREATION_ORDER_F H5P_mp_H5PSET_SHARED_MESG_NINDEXES_F H5P_mp_H5PSET_SHARED_MESG_INDEX_F H5P_mp_H5PGET_ATTR_CREATION_ORDER_F +H5P_mp_H5PGET_LIBVER_BOUNDS_F H5P_mp_H5PSET_LIBVER_BOUNDS_F H5P_mp_H5PSET_LINK_CREATION_ORDER_F H5P_mp_H5PGET_LINK_PHASE_CHANGE_F |