Skip to content

Commit

Permalink
Add H5F_LIBVER_V116 to internal library version structures (HDFGroup#…
Browse files Browse the repository at this point in the history
…4619)

Also add H5F_LIBVER_V116 flag to Fortran wrappers
  • Loading branch information
jhendersonHDF authored Jul 2, 2024
1 parent d6541ba commit 773831f
Show file tree
Hide file tree
Showing 21 changed files with 35 additions and 12 deletions.
1 change: 1 addition & 0 deletions fortran/src/H5_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion fortran/src/H5_ff.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
!
Expand Down
2 changes: 2 additions & 0 deletions fortran/src/H5f90global.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions fortran/test/tH5P_F03.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions src/H5Aint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
1 change: 1 addition & 0 deletions src/H5Dlayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 1 addition & 1 deletion src/H5Dpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
1 change: 1 addition & 0 deletions src/H5Fsuper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
1 change: 1 addition & 0 deletions src/H5Ofill.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
1 change: 1 addition & 0 deletions src/H5Ofsinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/H5Oint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
8 changes: 4 additions & 4 deletions src/H5Opkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions src/H5Opline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
1 change: 1 addition & 0 deletions src/H5S.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
3 changes: 2 additions & 1 deletion src/H5Shyper.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 1 addition & 1 deletion src/H5Spkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 2 additions & 1 deletion src/H5Spoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
1 change: 1 addition & 0 deletions src/H5T.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
};

Expand Down
2 changes: 1 addition & 1 deletion src/H5Tpkg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion test/dtypes.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
3 changes: 2 additions & 1 deletion test/h5test.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 773831f

Please sign in to comment.