From 773831f3cb844d252340edcf3a62e08b77bf162a Mon Sep 17 00:00:00 2001 From: jhendersonHDF Date: Tue, 2 Jul 2024 09:26:05 -0500 Subject: [PATCH] Add H5F_LIBVER_V116 to internal library version structures (#4619) Also add H5F_LIBVER_V116 flag to Fortran wrappers --- fortran/src/H5_f.c | 1 + fortran/src/H5_ff.F90 | 3 ++- fortran/src/H5f90global.F90 | 2 ++ fortran/test/tH5P_F03.F90 | 7 +++++++ src/H5Aint.c | 1 + src/H5Dlayout.c | 1 + src/H5Dpkg.h | 2 +- src/H5Fsuper.c | 1 + src/H5Ofill.c | 1 + src/H5Ofsinfo.c | 1 + src/H5Oint.c | 1 + src/H5Opkg.h | 8 ++++---- src/H5Opline.c | 1 + src/H5S.c | 1 + src/H5Shyper.c | 3 ++- src/H5Spkg.h | 2 +- src/H5Spoint.c | 3 ++- src/H5T.c | 1 + src/H5Tpkg.h | 2 +- test/dtypes.c | 2 +- test/h5test.c | 3 ++- 21 files changed, 35 insertions(+), 12 deletions(-) diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 530068ba880..3b278bbbc54 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -539,6 +539,7 @@ h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid h5f_flags[27] = (int_f)H5F_LIBVER_V110; h5f_flags[28] = (int_f)H5F_LIBVER_V112; h5f_flags[29] = (int_f)H5F_LIBVER_V114; + h5f_flags[30] = (int_f)H5F_LIBVER_V116; /* * H5FD flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index fb3bba67198..f4bb211e0d1 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -56,7 +56,7 @@ MODULE H5LIB ! ! H5F flags declaration ! - INTEGER, PARAMETER :: H5F_FLAGS_LEN = 30 + INTEGER, PARAMETER :: H5F_FLAGS_LEN = 31 INTEGER, DIMENSION(1:H5F_FLAGS_LEN) :: H5F_flags ! ! H5generic flags declaration @@ -379,6 +379,7 @@ END FUNCTION h5init1_flags_c H5F_LIBVER_V110_F = H5F_flags(28) H5F_LIBVER_V112_F = H5F_flags(29) H5F_LIBVER_V114_F = H5F_flags(30) + H5F_LIBVER_V116_F = H5F_flags(31) ! ! H5generic flags ! diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index 4794bdc83c8..6d8697da699 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -236,6 +236,7 @@ MODULE H5GLOBAL !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V110_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V112_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V114_F + !DEC$ATTRIBUTES DLLEXPORT :: H5F_LIBVER_V116_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_FSM_AGGR_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_PAGE_F !DEC$ATTRIBUTES DLLEXPORT :: H5F_FSPACE_STRATEGY_AGGR_F @@ -269,6 +270,7 @@ MODULE H5GLOBAL INTEGER :: H5F_LIBVER_V110_F !< H5F_LIBVER_V110 INTEGER :: H5F_LIBVER_V112_F !< H5F_LIBVER_V112 INTEGER :: H5F_LIBVER_V114_F !< H5F_LIBVER_V114 + INTEGER :: H5F_LIBVER_V116_F !< H5F_LIBVER_V116 INTEGER :: H5F_FSPACE_STRATEGY_FSM_AGGR_F !< H5F_FSPACE_STRATEGY_FSM_AGGR INTEGER :: H5F_FSPACE_STRATEGY_PAGE_F !< H5F_FSPACE_STRATEGY_PAGE INTEGER :: H5F_FSPACE_STRATEGY_AGGR_F !< H5F_FSPACE_STRATEGY_AGGR diff --git a/fortran/test/tH5P_F03.F90 b/fortran/test/tH5P_F03.F90 index 64dd1d2891c..95b634e6782 100644 --- a/fortran/test/tH5P_F03.F90 +++ b/fortran/test/tH5P_F03.F90 @@ -228,6 +228,13 @@ SUBROUTINE test_create(total_error) CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V114_F, total_error) CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V114_F, total_error) + CALL h5pset_libver_bounds_f(fapl, H5F_LIBVER_V116_F, H5F_LIBVER_V116_F, error) + CALL check("h5pset_libver_bounds_f",error, total_error) + CALL h5pget_libver_bounds_f(fapl, low, high, error) + CALL check("h5pget_libver_bounds_f",error, total_error) + CALL VERIFY("***ERROR: Returned wrong low libver_bounds", low, H5F_LIBVER_V116_F, total_error) + CALL VERIFY("***ERROR: Returned wrong high libver_bounds", high, H5F_LIBVER_V116_F, total_error) + CALL H5Pset_libver_bounds_f(fapl, H5F_LIBVER_LATEST_F, H5F_LIBVER_LATEST_F, error) CALL check("H5Pset_libver_bounds_f",error, total_error) CALL h5pget_libver_bounds_f(fapl, low, high, error) diff --git a/src/H5Aint.c b/src/H5Aint.c index 45df0dfbe3e..a459402f589 100644 --- a/src/H5Aint.c +++ b/src/H5Aint.c @@ -95,6 +95,7 @@ const unsigned H5O_attr_ver_bounds[] = { H5O_ATTR_VERSION_3, /* H5F_LIBVER_V110 */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V112 */ H5O_ATTR_VERSION_3, /* H5F_LIBVER_V114 */ + H5O_ATTR_VERSION_3, /* H5F_LIBVER_V116 */ H5O_ATTR_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Dlayout.c b/src/H5Dlayout.c index 249bfcc41e7..bd3765e2236 100644 --- a/src/H5Dlayout.c +++ b/src/H5Dlayout.c @@ -48,6 +48,7 @@ const unsigned H5O_layout_ver_bounds[] = { H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V110 */ H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V112 */ H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V114 */ + H5O_LAYOUT_VERSION_4, /* H5F_LIBVER_V116 */ H5O_LAYOUT_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Dpkg.h b/src/H5Dpkg.h index 4214341b434..c6c50c2eef3 100644 --- a/src/H5Dpkg.h +++ b/src/H5Dpkg.h @@ -633,7 +633,7 @@ H5_DLLVAR const H5B2_class_t H5D_BT2[1]; H5_DLLVAR const H5B2_class_t H5D_BT2_FILT[1]; /* Array of versions for Layout */ -H5_DLLVAR const unsigned H5O_layout_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_layout_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; /******************************/ /* Package Private Prototypes */ diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c index 5a32fc0ce68..550560d9387 100644 --- a/src/H5Fsuper.c +++ b/src/H5Fsuper.c @@ -71,6 +71,7 @@ static const unsigned HDF5_superblock_ver_bounds[] = { HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V110 */ HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V112 */ HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V114 */ + HDF5_SUPERBLOCK_VERSION_3, /* H5F_LIBVER_V116 */ HDF5_SUPERBLOCK_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ofill.c b/src/H5Ofill.c index a481275d5b8..1b56be12580 100644 --- a/src/H5Ofill.c +++ b/src/H5Ofill.c @@ -153,6 +153,7 @@ const unsigned H5O_fill_ver_bounds[] = { H5O_FILL_VERSION_3, /* H5F_LIBVER_V110 */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V112 */ H5O_FILL_VERSION_3, /* H5F_LIBVER_V114 */ + H5O_FILL_VERSION_3, /* H5F_LIBVER_V116 */ H5O_FILL_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Ofsinfo.c b/src/H5Ofsinfo.c index f9cb8feb111..6e559792530 100644 --- a/src/H5Ofsinfo.c +++ b/src/H5Ofsinfo.c @@ -69,6 +69,7 @@ static const unsigned H5O_fsinfo_ver_bounds[] = { H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V110 */ H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V112 */ H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V114 */ + H5O_FSINFO_VERSION_1, /* H5F_LIBVER_V116 */ H5O_FSINFO_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; #define N_FSINFO_VERSION_BOUNDS H5F_LIBVER_NBOUNDS diff --git a/src/H5Oint.c b/src/H5Oint.c index 5d4694d021c..2528fb93c68 100644 --- a/src/H5Oint.c +++ b/src/H5Oint.c @@ -127,6 +127,7 @@ const unsigned H5O_obj_ver_bounds[] = { H5O_VERSION_2, /* H5F_LIBVER_V110 */ H5O_VERSION_2, /* H5F_LIBVER_V112 */ H5O_VERSION_2, /* H5F_LIBVER_V114 */ + H5O_VERSION_2, /* H5F_LIBVER_V116 */ H5O_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Opkg.h b/src/H5Opkg.h index ee6126a818c..d4cab42471d 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -626,10 +626,10 @@ H5_DLL herr_t H5O__attr_count_real(H5F_t *f, H5O_t *oh, hsize_t *nattrs); * Object header, Attribute/Fill value/Filter pipeline messages */ /* Layout/Datatype/Dataspace arrays of versions are in H5Dpkg.h, H5Tpkg.h and H5Spkg.h */ -H5_DLLVAR const unsigned H5O_obj_ver_bounds[H5F_LIBVER_NBOUNDS]; -H5_DLLVAR const unsigned H5O_attr_ver_bounds[H5F_LIBVER_NBOUNDS]; -H5_DLLVAR const unsigned H5O_fill_ver_bounds[H5F_LIBVER_NBOUNDS]; -H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_obj_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; +H5_DLLVAR const unsigned H5O_attr_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; +H5_DLLVAR const unsigned H5O_fill_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; +H5_DLLVAR const unsigned H5O_pline_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; /* Testing functions */ #ifdef H5O_TESTING diff --git a/src/H5Opline.c b/src/H5Opline.c index 80345d85abb..2ee866a0dcb 100644 --- a/src/H5Opline.c +++ b/src/H5Opline.c @@ -88,6 +88,7 @@ const unsigned H5O_pline_ver_bounds[] = { H5O_PLINE_VERSION_2, /* H5F_LIBVER_V110 */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_PLINE_VERSION_2, /* H5F_LIBVER_V114 */ + H5O_PLINE_VERSION_2, /* H5F_LIBVER_V116 */ H5O_PLINE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5S.c b/src/H5S.c index 3b8a825ee8c..d6611654729 100644 --- a/src/H5S.c +++ b/src/H5S.c @@ -61,6 +61,7 @@ const unsigned H5O_sdspace_ver_bounds[] = { H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V110 */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V112 */ H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V114 */ + H5O_SDSPACE_VERSION_2, /* H5F_LIBVER_V116 */ H5O_SDSPACE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Shyper.c b/src/H5Shyper.c index 143839265ac..bc5d6c3db96 100644 --- a/src/H5Shyper.c +++ b/src/H5Shyper.c @@ -235,12 +235,13 @@ const H5S_select_class_t H5S_sel_hyper[1] = {{ }}; /* Format version bounds for dataspace hyperslab selection */ -const unsigned H5O_sds_hyper_ver_bounds[] = { +static const unsigned H5O_sds_hyper_ver_bounds[] = { H5S_HYPER_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5S_HYPER_VERSION_1, /* H5F_LIBVER_V18 */ H5S_HYPER_VERSION_2, /* H5F_LIBVER_V110 */ H5S_HYPER_VERSION_3, /* H5F_LIBVER_V112 */ H5S_HYPER_VERSION_3, /* H5F_LIBVER_V114 */ + H5S_HYPER_VERSION_3, /* H5F_LIBVER_V116 */ H5S_HYPER_VERSION_3 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Spkg.h b/src/H5Spkg.h index e851f548f94..ea0feefffa7 100644 --- a/src/H5Spkg.h +++ b/src/H5Spkg.h @@ -382,7 +382,7 @@ H5_DLLVAR const H5S_select_class_t H5S_sel_none[1]; H5_DLLVAR const H5S_select_class_t H5S_sel_point[1]; /* Array of versions for Dataspace */ -H5_DLLVAR const unsigned H5O_sdspace_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_sdspace_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; /* Extent functions */ H5_DLL herr_t H5S__extent_release(H5S_extent_t *extent); diff --git a/src/H5Spoint.c b/src/H5Spoint.c index 142332d6252..e102969657b 100644 --- a/src/H5Spoint.c +++ b/src/H5Spoint.c @@ -120,12 +120,13 @@ const H5S_select_class_t H5S_sel_point[1] = {{ }}; /* Format version bounds for dataspace point selection */ -const unsigned H5O_sds_point_ver_bounds[] = { +static const unsigned H5O_sds_point_ver_bounds[] = { H5S_POINT_VERSION_1, /* H5F_LIBVER_EARLIEST */ H5S_POINT_VERSION_1, /* H5F_LIBVER_V18 */ H5S_POINT_VERSION_1, /* H5F_LIBVER_V110 */ H5S_POINT_VERSION_2, /* H5F_LIBVER_V112 */ H5S_POINT_VERSION_2, /* H5F_LIBVER_V114 */ + H5S_POINT_VERSION_2, /* H5F_LIBVER_V116 */ H5S_POINT_VERSION_2 /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5T.c b/src/H5T.c index 23993b3d639..dcf0a679fed 100644 --- a/src/H5T.c +++ b/src/H5T.c @@ -609,6 +609,7 @@ const unsigned H5O_dtype_ver_bounds[] = { H5O_DTYPE_VERSION_3, /* H5F_LIBVER_V110 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V112 */ H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V114 */ + H5O_DTYPE_VERSION_4, /* H5F_LIBVER_V116 */ H5O_DTYPE_VERSION_LATEST /* H5F_LIBVER_LATEST */ }; diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 8ceea058592..c3171ca0b81 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -344,7 +344,7 @@ typedef struct { typedef herr_t (*H5T_operator_t)(H5T_t *dt, void *op_data /*in,out*/); /* Array of versions for Datatype */ -H5_DLLVAR const unsigned H5O_dtype_ver_bounds[H5F_LIBVER_NBOUNDS]; +H5_DLLVAR const unsigned H5O_dtype_ver_bounds[H5F_LIBVER_NBOUNDS + 1]; /* * Alignment constraints for HDF5 types. Accessing objects of these diff --git a/test/dtypes.c b/test/dtypes.c index a457767a477..86cd27e3868 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -10115,7 +10115,7 @@ test_versionbounds(void) hsize_t arr_dim[] = {ARRAY_LEN}; /* Length of the array */ int low, high; /* Indices for iterating over versions */ H5F_libver_t versions[] = {H5F_LIBVER_EARLIEST, H5F_LIBVER_V18, H5F_LIBVER_V110, - H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V114}; + H5F_LIBVER_V112, H5F_LIBVER_V114, H5F_LIBVER_V116}; int versions_count = 6; /* Number of version bounds in the array */ unsigned highest_version; /* Highest version in nested datatypes */ color_t enum_val; /* Enum type index */ diff --git a/test/h5test.c b/test/h5test.c index 97e413ac4a8..c18efdc7dff 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -106,7 +106,8 @@ const char *LIBVER_NAMES[] = {"earliest", /* H5F_LIBVER_EARLIEST = 0 */ "v110", /* H5F_LIBVER_V110 = 2 */ "v112", /* H5F_LIBVER_V112 = 3 */ "v114", /* H5F_LIBVER_V114 = 4 */ - "latest", /* H5F_LIBVER_V116 = 5 */ + "v116", /* H5F_LIBVER_V116 = 5 */ + "latest", /* H5F_LIBVER_LATEST */ NULL}; /* Previous error reporting function */