diff options
author | M. Scot Breitenfeld <brtnfld@hdfgroup.org> | 2016-10-10 15:25:09 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2016-10-14 17:02:02 (GMT) |
commit | 21b5e3132ebb544797130c57224fca2cb2654b15 (patch) | |
tree | e450f85cad0dff45be9d738e9c30f0b1917b33d8 /fortran | |
parent | fe5c359ce94012dde56938a125a71393a3f8e852 (diff) | |
download | hdf5-21b5e3132ebb544797130c57224fca2cb2654b15.zip hdf5-21b5e3132ebb544797130c57224fca2cb2654b15.tar.gz hdf5-21b5e3132ebb544797130c57224fca2cb2654b15.tar.bz2 |
Fix:HDFFV-9987
With HDF5-1.10 you cannot specify default dataspace for Fortran (H5S_ALL_F)
Resolution:
Made H5S_ALL_F INTEGER(HID_T) to match C.
Diffstat (limited to 'fortran')
-rw-r--r-- | fortran/src/H5_f.c | 45 | ||||
-rw-r--r-- | fortran/src/H5_ff.F90 | 5 | ||||
-rw-r--r-- | fortran/src/H5f90global.F90 | 46 | ||||
-rw-r--r-- | fortran/src/H5f90proto.h | 14 | ||||
-rw-r--r-- | fortran/test/tH5T.F90 | 2 | ||||
-rw-r--r-- | fortran/test/tH5T_F03.F90 | 2 |
6 files changed, 66 insertions, 48 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index f9fe927..860f9cb 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -334,6 +334,7 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, * h5p_flags_int - H5P interface flags of type integer * h5r_flags - H5R interface flags * h5s_flags - H5S interface flags + * h5s_hid_flags - H5S interface flags of type hid_t * h5s_hsize_flags - H5S interface flags of type hsize_t * h5t_flags - H5T interface flags * h5z_flags - H5Z interface flags @@ -356,6 +357,8 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, * MSB, July 9, 2009 * Added type h5d_flags of type size_t * MSB, Feb. 28, 2014 + * Added type h5s_hid_flags of type hid_t + * MSB, Oct. 10, 2016 * SOURCE */ int_f @@ -363,8 +366,9 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, - hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, - hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, + hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, + int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags, + int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, haddr_t_f *h5_haddr_generic_flags) /******/ { @@ -593,29 +597,32 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, /* * H5S flags */ + + h5s_hid_flags[0] = (hid_t_f)H5S_ALL; + + h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED; + h5s_flags[0] = (int_f)H5S_SCALAR; h5s_flags[1] = (int_f)H5S_SIMPLE; h5s_flags[2] = (int_f)H5S_NULL; h5s_flags[3] = (int_f)H5S_SELECT_SET; h5s_flags[4] = (int_f)H5S_SELECT_OR; - h5s_flags[5] = (int_f)H5S_ALL; - - h5s_flags[6] = (int_f)H5S_SELECT_NOOP; - h5s_flags[7] = (int_f)H5S_SELECT_AND; - h5s_flags[8] = (int_f)H5S_SELECT_XOR; - h5s_flags[9] = (int_f)H5S_SELECT_NOTB; - h5s_flags[10] = (int_f)H5S_SELECT_NOTA; - h5s_flags[11] = (int_f)H5S_SELECT_APPEND; - h5s_flags[12] = (int_f)H5S_SELECT_PREPEND; - h5s_flags[13] = (int_f)H5S_SELECT_INVALID; - - h5s_flags[14] = (int_f)H5S_SEL_ERROR; - h5s_flags[15] = (int_f)H5S_SEL_NONE; - h5s_flags[16] = (int_f)H5S_SEL_POINTS; - h5s_flags[17] = (int_f)H5S_SEL_HYPERSLABS; - h5s_flags[18] = (int_f)H5S_SEL_ALL; - h5s_hsize_flags[0] = (hsize_t_f)H5S_UNLIMITED; + h5s_flags[5] = (int_f)H5S_SELECT_NOOP; + h5s_flags[6] = (int_f)H5S_SELECT_AND; + h5s_flags[7] = (int_f)H5S_SELECT_XOR; + h5s_flags[8] = (int_f)H5S_SELECT_NOTB; + h5s_flags[9] = (int_f)H5S_SELECT_NOTA; + + h5s_flags[10] = (int_f)H5S_SELECT_APPEND; + h5s_flags[11] = (int_f)H5S_SELECT_PREPEND; + h5s_flags[12] = (int_f)H5S_SELECT_INVALID; + h5s_flags[13] = (int_f)H5S_SEL_ERROR; + h5s_flags[14] = (int_f)H5S_SEL_NONE; + + h5s_flags[15] = (int_f)H5S_SEL_POINTS; + h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS; + h5s_flags[17] = (int_f)H5S_SEL_ALL; /* * H5T flags diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 228e148..f2036ee 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -102,6 +102,7 @@ CONTAINS i_H5P_flags_int, & i_H5R_flags, & i_H5S_flags, & + i_H5S_hid_flags, & i_H5S_hsize_flags, & i_H5T_flags, & i_H5Z_flags, & @@ -114,7 +115,7 @@ CONTAINS H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, & H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, & H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, & - H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & + H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HID_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, & H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN, H5generic_haddr_FLAGS_LEN IMPLICIT NONE INTEGER i_H5D_flags(H5D_FLAGS_LEN) @@ -132,6 +133,7 @@ CONTAINS INTEGER i_H5P_flags_int(H5P_FLAGS_INT_LEN) INTEGER i_H5R_flags(H5R_FLAGS_LEN) INTEGER i_H5S_flags(H5S_FLAGS_LEN) + INTEGER(HID_T) i_H5S_hid_flags(H5S_HID_FLAGS_LEN) INTEGER(HSIZE_T) i_H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) INTEGER i_H5T_flags(H5T_FLAGS_LEN) INTEGER i_H5Z_flags(H5Z_FLAGS_LEN) @@ -163,6 +165,7 @@ CONTAINS H5P_flags_int, & H5R_flags, & H5S_flags, & + H5S_hid_flags, & H5S_hsize_flags, & H5T_flags, & H5Z_flags, & diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90 index b84f6c2..a85ee50 100644 --- a/fortran/src/H5f90global.F90 +++ b/fortran/src/H5f90global.F90 @@ -747,25 +747,29 @@ MODULE H5GLOBAL ! ! H5S flags declaration ! - INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19 + INTEGER, PARAMETER :: H5S_FLAGS_LEN = 18 INTEGER :: H5S_flags(H5S_FLAGS_LEN) INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1 INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN) + INTEGER, PARAMETER :: H5S_HID_FLAGS_LEN = 1 + INTEGER(HSIZE_T) H5S_hid_flags(H5S_HID_FLAGS_LEN) !DEC$if defined(BUILD_HDF5_DLL) !DEC$ATTRIBUTES DLLEXPORT :: /H5S_FLAGS/ + !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HID_FLAGS/ !DEC$ATTRIBUTES DLLEXPORT :: /H5S_HSIZE_FLAGS/ !DEC$endif COMMON /H5S_FLAGS/ H5S_flags + COMMON /H5S_HID_FLAGS/ H5S_hid_flags COMMON /H5S_HSIZE_FLAGS/ H5S_hsize_flags INTEGER(HSIZE_T) :: H5S_UNLIMITED_F + INTEGER(HID_T) :: H5S_ALL_F + INTEGER :: H5S_SCALAR_F INTEGER :: H5S_SIMPLE_F INTEGER :: H5S_NULL_F - INTEGER :: H5S_ALL_F - INTEGER :: H5S_SELECT_NOOP_F INTEGER :: H5S_SELECT_SET_F INTEGER :: H5S_SELECT_OR_F @@ -783,29 +787,31 @@ MODULE H5GLOBAL INTEGER :: H5S_SEL_HYPERSLABS_F INTEGER :: H5S_SEL_ALL_F + EQUIVALENCE(H5S_hid_flags(1), H5S_ALL_F) + EQUIVALENCE(H5S_hsize_flags(1), H5S_UNLIMITED_F) + EQUIVALENCE(H5S_flags(1), H5S_SCALAR_F) EQUIVALENCE(H5S_flags(2), H5S_SIMPLE_F) EQUIVALENCE(H5S_flags(3), H5S_NULL_F) EQUIVALENCE(H5S_flags(4), H5S_SELECT_SET_F) EQUIVALENCE(H5S_flags(5), H5S_SELECT_OR_F) - EQUIVALENCE(H5S_flags(6), H5S_ALL_F) - - EQUIVALENCE(H5S_flags(7), H5S_SELECT_NOOP_F) - EQUIVALENCE(H5S_flags(8), H5S_SELECT_AND_F) - EQUIVALENCE(H5S_flags(9), H5S_SELECT_XOR_F) - EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTB_F) - EQUIVALENCE(H5S_flags(11), H5S_SELECT_NOTA_F) - EQUIVALENCE(H5S_flags(12), H5S_SELECT_APPEND_F) - EQUIVALENCE(H5S_flags(13), H5S_SELECT_PREPEND_F) - EQUIVALENCE(H5S_flags(14), H5S_SELECT_INVALID_F) - - - EQUIVALENCE(H5S_flags(15), H5S_SEL_ERROR_F) - EQUIVALENCE(H5S_flags(16), H5S_SEL_NONE_F) - EQUIVALENCE(H5S_flags(17), H5S_SEL_POINTS_F) - EQUIVALENCE(H5S_flags(18), H5S_SEL_HYPERSLABS_F) - EQUIVALENCE(H5S_flags(19), H5S_SEL_ALL_F) + + EQUIVALENCE(H5S_flags(6), H5S_SELECT_NOOP_F) + EQUIVALENCE(H5S_flags(7), H5S_SELECT_AND_F) + EQUIVALENCE(H5S_flags(8), H5S_SELECT_XOR_F) + EQUIVALENCE(H5S_flags(9), H5S_SELECT_NOTB_F) + EQUIVALENCE(H5S_flags(10), H5S_SELECT_NOTA_F) + + EQUIVALENCE(H5S_flags(11), H5S_SELECT_APPEND_F) + EQUIVALENCE(H5S_flags(12), H5S_SELECT_PREPEND_F) + EQUIVALENCE(H5S_flags(13), H5S_SELECT_INVALID_F) + EQUIVALENCE(H5S_flags(14), H5S_SEL_ERROR_F) + EQUIVALENCE(H5S_flags(15), H5S_SEL_NONE_F) + + EQUIVALENCE(H5S_flags(16), H5S_SEL_POINTS_F) + EQUIVALENCE(H5S_flags(17), H5S_SEL_HYPERSLABS_F) + EQUIVALENCE(H5S_flags(18), H5S_SEL_ALL_F) ! ! H5T flags declaration diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h index f8b4564..67f28db 100644 --- a/fortran/src/H5f90proto.h +++ b/fortran/src/H5f90proto.h @@ -525,12 +525,14 @@ H5_FCDLL int_f h5open_c(void); H5_FCDLL int_f h5close_c(void); H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes); H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen); -H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, - int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, - int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, - hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags, - hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, - haddr_t_f *h5_haddr_generic_flags); +H5_FCDLL int_f h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags, + int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags, + int_f *h5fd_flags, hid_t_f *h5fd_hid_flags, + int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags, + hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, + int_f *h5s_flags, hid_t_f *h5s_hid_flags, hsize_t_f *h5s_hsize_flags, + int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags, + haddr_t_f *h5_haddr_generic_flags); H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags); H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum); H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum); diff --git a/fortran/test/tH5T.F90 b/fortran/test/tH5T.F90 index efbceea..1a3a382 100644 --- a/fortran/test/tH5T.F90 +++ b/fortran/test/tH5T.F90 @@ -490,7 +490,7 @@ CONTAINS ! ! Read part of the dataset ! - CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error) + CALL h5dread_f(dset_id, dt1_id, char_member_out, data_dims, error, H5S_ALL_F, H5S_ALL_F, H5P_DEFAULT_F) CALL check("h5dread_f", error, total_error) do i = 1, dimsize if (char_member_out(i) .ne. char_member(i)) then diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index c8be606..c596d31 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -249,7 +249,7 @@ SUBROUTINE test_array_compound_atomic(total_error) ! Read dataset from disk f_ptr = C_LOC(rdata(1,1)) - CALL H5Dread_f(dataset, tid1, f_ptr, error) + CALL H5Dread_f(dataset, tid1, f_ptr, error, H5S_ALL_F, H5S_ALL_F, H5P_DEFAULT_F) CALL check("H5Dread_f", error, total_error) ! Compare data read in |