diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2020-08-26 14:54:24 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2020-08-26 14:54:24 (GMT) |
commit | 817af161a8d463eaec385d0959e06b546f27ae45 (patch) | |
tree | 122798d3f74b523c2cbea6bbce0f450ba9c9d70e /fortran/src | |
parent | 04971bec7f06893c9971c03eaf7d83bf5726c22c (diff) | |
download | hdf5-817af161a8d463eaec385d0959e06b546f27ae45.zip hdf5-817af161a8d463eaec385d0959e06b546f27ae45.tar.gz hdf5-817af161a8d463eaec385d0959e06b546f27ae45.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
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
Updated Release notes.
Diffstat (limited to 'fortran/src')
-rw-r--r-- | fortran/src/H5Pf.c | 40 | ||||
-rw-r--r-- | fortran/src/H5Pff.F90 | 93 | ||||
-rw-r--r-- | fortran/src/H5_f.c | 6 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 8 | ||||
-rw-r--r-- | fortran/src/H5f90global.F90 | 8 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 1 | ||||
-rw-r--r-- | fortran/src/hdf5_fortrandll.def.in | 1 |
7 files changed, 95 insertions, 62 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index 8789b69..84ff279 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -4056,46 +4056,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 dd5619e..4b13501 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 b351893..b80d4fd 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -443,7 +443,11 @@ 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; /* * H5FD flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 5476209..e96dae4 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 = 23 INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags ! ! H5generic flags declaration @@ -343,7 +343,11 @@ 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) ! ! H5generic flags ! diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 72b1802..a3c6f74 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -232,6 +232,10 @@ 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$endif INTEGER :: H5F_ACC_RDWR_F @@ -253,6 +257,10 @@ 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 ! ! H5G flags declaration ! diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index d88f1ad..b522680 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -448,7 +448,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 8438f2a..a1fe93d 100644 --- a/fortran/src/hdf5_fortrandll.def.in +++ b/fortran/src/hdf5_fortrandll.def.in @@ -285,6 +285,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 |