summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2014-03-20 14:06:42 (GMT)
committerScot Breitenfeld <brtnfld@hdfgroup.org>2014-03-20 14:06:42 (GMT)
commit34bfba14d5cd30f8ce7c524bc6a729f6cc08cf1c (patch)
tree7871c8c6b1849428445b799f352074ef2646ae4e /fortran/src
parentff565cd175fa5c4c1563496572aa27b0e9484acd (diff)
downloadhdf5-34bfba14d5cd30f8ce7c524bc6a729f6cc08cf1c.zip
hdf5-34bfba14d5cd30f8ce7c524bc6a729f6cc08cf1c.tar.gz
hdf5-34bfba14d5cd30f8ce7c524bc6a729f6cc08cf1c.tar.bz2
[svn-r24846] Bug fix for HDFFV-8689 : Mix-match of type in H5D_CHUNK_CACHE_NBYTES_DEFAULT, Review HDF5-184
Tested with -i8 flag with intel compilers and --enable-production
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5_f.c33
-rw-r--r--fortran/src/H5_ff.f903
-rw-r--r--fortran/src/H5f90global.f9059
-rw-r--r--fortran/src/H5f90proto.h6
4 files changed, 57 insertions, 44 deletions
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 4c85df2..dcfcfc4 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -330,9 +330,10 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
* PURPOSE
* Initialize Fortran flags
* INPUTS
- * h5d_flags - H5D inteface flags
- * h5e_flags - H5E inteface flags
- * h5e_hid_flags - H5E inteface flags of type hid_t
+ * h5d_flags - H5D interface flags
+ * h5d_size_flags - H5D interface flags of type size_t
+ * h5e_flags - H5E interface flags
+ * h5e_hid_flags - H5E interface flags of type hid_t
* h5f_flags - H5F interface flags
* h5fd_flags - H5FD interface flags
* h5fd_hid_flags - H5FD interface flags of type hid_t
@@ -360,12 +361,15 @@ nh5close_types_c( hid_t_f * types, int_f *lentypes,
* Added Generic flags introduced in version 1.8
* MSB, January, 2008
* Added types in lines h5*_flags = ( )variable to match input
- * Added E flags.
+ * Added E flags
* MSB, July 9, 2009
+ * Added type h5d_flags of type size_t
+ * MSB, Feb. 28, 2014
* SOURCE
*/
int_f
-nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
+nh5init_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,
@@ -376,6 +380,9 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int
/*
* H5D flags
*/
+ h5d_size_flags[0] = (size_t_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
+ h5d_size_flags[1] = (size_t_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT;
+
h5d_flags[0] = (int_f)H5D_COMPACT;
h5d_flags[1] = (int_f)H5D_CONTIGUOUS;
h5d_flags[2] = (int_f)H5D_CHUNKED;
@@ -395,18 +402,18 @@ nh5init_flags_c( int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int
h5d_flags[16] = (int_f)H5D_FILL_VALUE_UNDEFINED;
h5d_flags[17] = (int_f)H5D_FILL_VALUE_DEFAULT;
h5d_flags[18] = (int_f)H5D_FILL_VALUE_USER_DEFINED;
- h5d_flags[19] = (int_f)H5D_CHUNK_CACHE_NSLOTS_DEFAULT;
- h5d_flags[20] = (int_f)H5D_CHUNK_CACHE_NBYTES_DEFAULT;
- h5d_flags[21] = (int_f)H5D_CHUNK_CACHE_W0_DEFAULT;
- h5d_flags[22] = (int_f)H5D_MPIO_NO_COLLECTIVE;
- h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_INDEPENDENT;
- h5d_flags[24] = (int_f)H5D_MPIO_CHUNK_COLLECTIVE;
- h5d_flags[25] = (int_f)H5D_MPIO_CHUNK_MIXED;
- h5d_flags[26] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE;
+ h5d_flags[19] = (int_f)H5D_CHUNK_CACHE_W0_DEFAULT;
+ h5d_flags[20] = (int_f)H5D_MPIO_NO_COLLECTIVE;
+ h5d_flags[21] = (int_f)H5D_MPIO_CHUNK_INDEPENDENT;
+ h5d_flags[22] = (int_f)H5D_MPIO_CHUNK_COLLECTIVE;
+ h5d_flags[23] = (int_f)H5D_MPIO_CHUNK_MIXED;
+ h5d_flags[24] = (int_f)H5D_MPIO_CONTIGUOUS_COLLECTIVE;
+
/*
* H5E flags
*/
h5e_hid_flags[0] = (hid_t_f)H5E_DEFAULT;
+
h5e_flags[0] = (int_f)H5E_MAJOR;
h5e_flags[1] = (int_f)H5E_MINOR;
h5e_flags[2] = (int_f)H5E_WALK_UPWARD;
diff --git a/fortran/src/H5_ff.f90 b/fortran/src/H5_ff.f90
index f9c20ac..49e64a3 100644
--- a/fortran/src/H5_ff.f90
+++ b/fortran/src/H5_ff.f90
@@ -87,6 +87,7 @@ CONTAINS
END INTERFACE
INTERFACE
INTEGER FUNCTION h5init_flags_c(i_H5D_flags, &
+ i_H5D_size_flags,&
i_H5E_flags, &
i_H5E_hid_flags, &
i_H5F_flags, &
@@ -106,6 +107,7 @@ CONTAINS
i_H5generic_flags)
USE H5GLOBAL
INTEGER i_H5D_flags(H5D_FLAGS_LEN)
+ INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN)
INTEGER i_H5E_flags(H5E_FLAGS_LEN)
INTEGER(HID_T) i_H5E_hid_flags(H5E_HID_FLAGS_LEN)
INTEGER i_H5F_flags(H5F_FLAGS_LEN)
@@ -139,6 +141,7 @@ CONTAINS
END INTERFACE
error_1 = h5init_types_c(predef_types, floating_types, integer_types)
error_2 = h5init_flags_c(H5D_flags, &
+ H5D_size_flags, &
H5E_flags, &
H5E_hid_flags, &
H5F_flags, &
diff --git a/fortran/src/H5f90global.f90 b/fortran/src/H5f90global.f90
index a6168d52..f2bb3de 100644
--- a/fortran/src/H5f90global.f90
+++ b/fortran/src/H5f90global.f90
@@ -76,7 +76,7 @@ MODULE H5GLOBAL
! integer data types are added
INTEGER, PARAMETER :: INTEGER_TYPES_LEN = 27
- INTEGER(HID_T) H5T_NATIVE_INTEGER_1, &
+ INTEGER(HID_T) :: H5T_NATIVE_INTEGER_1, &
H5T_NATIVE_INTEGER_2, &
H5T_NATIVE_INTEGER_4, &
H5T_NATIVE_INTEGER_8, &
@@ -111,7 +111,7 @@ MODULE H5GLOBAL
! continuation lines to 39; the F03/F08 standard limits the number
! to 255 lines.
- INTEGER(HID_T) H5T_STD_U32LE, &
+ INTEGER(HID_T) :: H5T_STD_U32LE, &
H5T_STD_U64BE, &
H5T_STD_U64LE, &
H5T_STRING, &
@@ -235,7 +235,7 @@ MODULE H5GLOBAL
! H5F flags declaration
!
INTEGER, PARAMETER :: H5F_FLAGS_LEN = 19
- INTEGER H5F_flags(H5F_FLAGS_LEN)
+ INTEGER :: H5F_flags(H5F_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5F_FLAGS/
!DEC$endif
@@ -284,7 +284,7 @@ MODULE H5GLOBAL
! H5generic flags declaration
!
INTEGER, PARAMETER :: H5generic_FLAGS_LEN = 9
- INTEGER H5generic_flags(H5generic_FLAGS_LEN)
+ INTEGER :: H5generic_flags(H5generic_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5generic_FLAGS/
!DEC$endif
@@ -315,7 +315,7 @@ MODULE H5GLOBAL
! H5G flags declaration
!
INTEGER, PARAMETER :: H5G_FLAGS_LEN = 12
- INTEGER H5G_flags(H5G_FLAGS_LEN)
+ INTEGER :: H5G_flags(H5G_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5G_FLAGS/
!DEC$endif
@@ -354,8 +354,10 @@ MODULE H5GLOBAL
! H5D flags declaration
!
- INTEGER, PARAMETER :: H5D_FLAGS_LEN = 27
- INTEGER H5D_flags(H5D_FLAGS_LEN)
+ INTEGER, PARAMETER :: H5D_FLAGS_LEN = 25
+ INTEGER :: H5D_flags(H5D_FLAGS_LEN)
+ INTEGER, PARAMETER :: H5D_SIZE_FLAGS_LEN = 2
+ INTEGER(SIZE_T) :: H5D_size_flags(H5D_SIZE_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5D_FLAGS/
!DEC$endif
@@ -390,8 +392,8 @@ MODULE H5GLOBAL
! shortened "_CONTIGUOUS" to "_CONTIG" to satisfy the limit of 31
! characters for variable names in Fortran.
- INTEGER :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F
- INTEGER :: H5D_CHUNK_CACHE_NBYTES_DFLT_F
+ INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NSLOTS_DFLT_F
+ INTEGER(SIZE_T) :: H5D_CHUNK_CACHE_NBYTES_DFLT_F
INTEGER :: H5D_CHUNK_CACHE_W0_DFLT_F
INTEGER :: H5D_MPIO_NO_COLLECTIVE_F
INTEGER :: H5D_MPIO_CHUNK_INDEPENDENT_F
@@ -423,22 +425,23 @@ MODULE H5GLOBAL
EQUIVALENCE(H5D_flags(18), H5D_FILL_VALUE_DEFAULT_F)
EQUIVALENCE(H5D_flags(19), H5D_FILL_VALUE_USER_DEFINED_F)
- EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_NSLOTS_DFLT_F)
- EQUIVALENCE(H5D_flags(21), H5D_CHUNK_CACHE_NBYTES_DFLT_F)
- EQUIVALENCE(H5D_flags(22), H5D_CHUNK_CACHE_W0_DFLT_F)
- EQUIVALENCE(H5D_flags(23), H5D_MPIO_NO_COLLECTIVE_F)
- EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_INDEPENDENT_F)
- EQUIVALENCE(H5D_flags(25), H5D_MPIO_CHUNK_COLLECTIVE_F)
- EQUIVALENCE(H5D_flags(26), H5D_MPIO_CHUNK_MIXED_F)
- EQUIVALENCE(H5D_flags(27), H5D_MPIO_CONTIG_COLLECTIVE_F)
+ EQUIVALENCE(H5D_flags(20), H5D_CHUNK_CACHE_W0_DFLT_F)
+ EQUIVALENCE(H5D_flags(21), H5D_MPIO_NO_COLLECTIVE_F)
+ EQUIVALENCE(H5D_flags(22), H5D_MPIO_CHUNK_INDEPENDENT_F)
+ EQUIVALENCE(H5D_flags(23), H5D_MPIO_CHUNK_COLLECTIVE_F)
+ EQUIVALENCE(H5D_flags(24), H5D_MPIO_CHUNK_MIXED_F)
+ EQUIVALENCE(H5D_flags(25), H5D_MPIO_CONTIG_COLLECTIVE_F)
+
+ EQUIVALENCE(H5D_size_flags(1), H5D_CHUNK_CACHE_NSLOTS_DFLT_F)
+ EQUIVALENCE(H5D_size_flags(2), H5D_CHUNK_CACHE_NBYTES_DFLT_F)
!
! H5E flags declaration
!
INTEGER, PARAMETER :: H5E_FLAGS_LEN = 4
- INTEGER H5E_flags(H5E_FLAGS_LEN)
+ INTEGER :: H5E_flags(H5E_FLAGS_LEN)
INTEGER, PARAMETER :: H5E_HID_FLAGS_LEN = 1
- INTEGER(HID_T) H5E_hid_flags(H5E_HID_FLAGS_LEN)
+ INTEGER(HID_T) :: H5E_hid_flags(H5E_HID_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5E_FLAGS/
!DEC$ATTRIBUTES DLLEXPORT :: /H5E_HID_FLAGS/
@@ -462,7 +465,7 @@ MODULE H5GLOBAL
! H5FD flags declaration
!
INTEGER, PARAMETER :: H5FD_FLAGS_LEN = 11
- INTEGER H5FD_flags(H5FD_FLAGS_LEN)
+ INTEGER :: H5FD_flags(H5FD_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5FD_FLAGS/
!DEC$endif
@@ -495,7 +498,7 @@ MODULE H5GLOBAL
! H5FD file drivers flags declaration
!
INTEGER, PARAMETER :: H5FD_HID_FLAGS_LEN = 7
- INTEGER(HID_T) H5FD_hid_flags(H5FD_HID_FLAGS_LEN)
+ INTEGER(HID_T) :: H5FD_hid_flags(H5FD_HID_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5FD_HID_FLAGS/
!DEC$endif
@@ -521,7 +524,7 @@ MODULE H5GLOBAL
! H5I flags declaration
!
INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7
- INTEGER H5I_flags(H5I_FLAGS_LEN)
+ INTEGER :: H5I_flags(H5I_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5I_FLAGS/
!DEC$endif
@@ -671,10 +674,10 @@ MODULE H5GLOBAL
EQUIVALENCE(H5P_flags(18), H5P_LINK_ACCESS_F)
!
- ! H5P intgere flags declaration
+ ! H5P integers flags declaration
!
INTEGER, PARAMETER :: H5P_FLAGS_INT_LEN = 2
- INTEGER H5P_flags_int(H5P_FLAGS_INT_LEN)
+ INTEGER :: H5P_flags_int(H5P_FLAGS_INT_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5P_FLAGS_INT/
!DEC$endif
@@ -687,7 +690,7 @@ MODULE H5GLOBAL
! H5R flags declaration
!
INTEGER, PARAMETER :: H5R_FLAGS_LEN = 2
- INTEGER H5R_flags(H5R_FLAGS_LEN)
+ INTEGER :: H5R_flags(H5R_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5R_FLAGS/
!DEC$endif
@@ -703,7 +706,7 @@ MODULE H5GLOBAL
! H5S flags declaration
!
INTEGER, PARAMETER :: H5S_FLAGS_LEN = 19
- INTEGER H5S_flags(H5S_FLAGS_LEN)
+ INTEGER :: H5S_flags(H5S_FLAGS_LEN)
INTEGER, PARAMETER :: H5S_HSIZE_FLAGS_LEN = 1
INTEGER(HSIZE_T) H5S_hsize_flags(H5S_HSIZE_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
@@ -766,7 +769,7 @@ MODULE H5GLOBAL
! H5T flags declaration
!
INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35
- INTEGER H5T_flags(H5T_FLAGS_LEN)
+ INTEGER :: H5T_flags(H5T_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5T_FLAGS/
!DEC$endif
@@ -847,7 +850,7 @@ MODULE H5GLOBAL
! H5Z flags declaration
!
INTEGER, PARAMETER :: H5Z_FLAGS_LEN = 20
- INTEGER H5Z_flags(H5Z_FLAGS_LEN)
+ INTEGER :: H5Z_flags(H5Z_FLAGS_LEN)
!DEC$if defined(BUILD_HDF5_DLL)
!DEC$ATTRIBUTES DLLEXPORT :: /H5Z_FLAGS/
!DEC$endif
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 4b02b6c..2c5e9a1 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -1260,9 +1260,9 @@ H5_FCDLL int_f nprocess_buffer(hid_t_f *estack_id,void **buffer);
H5_FCDLL int_f nh5open_c(void);
H5_FCDLL int_f nh5close_c(void);
-H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f * floatingtypes, hid_t_f * integertypes);
-H5_FCDLL int_f nh5close_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 nh5init_flags_c(int_f *h5d_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
+H5_FCDLL int_f nh5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
+H5_FCDLL int_f nh5close_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 nh5init_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,