summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/H5Aff_F03.f905
-rw-r--r--fortran/src/H5Df.c4
-rw-r--r--fortran/src/H5Dff_F03.f9037
-rw-r--r--fortran/src/H5Dff_F90.f9010
-rw-r--r--fortran/src/H5Off_F03.f903
-rw-r--r--fortran/src/H5Pff.f902
-rw-r--r--fortran/src/H5Rff_F03.f904
-rw-r--r--fortran/src/H5Sf.c2
-rw-r--r--fortran/src/H5_f.c33
-rw-r--r--fortran/src/H5_ff.f903
-rw-r--r--fortran/src/H5f90global.f9061
-rw-r--r--fortran/src/H5f90proto.h6
-rw-r--r--fortran/src/H5test_kind_SIZEOF.f9066
-rw-r--r--fortran/src/HDF5mpio.f901
-rw-r--r--fortran/src/Makefile.am4
-rw-r--r--fortran/src/Makefile.in19
16 files changed, 136 insertions, 124 deletions
diff --git a/fortran/src/H5Aff_F03.f90 b/fortran/src/H5Aff_F03.f90
index 26c911a..807f6fa 100644
--- a/fortran/src/H5Aff_F03.f90
+++ b/fortran/src/H5Aff_F03.f90
@@ -1065,17 +1065,16 @@ CONTAINS
CHARACTER(LEN=*), INTENT(INOUT) :: buf ! Attribute data
INTEGER, INTENT(OUT) :: hdferr ! Error code
- CALL h5aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), dims, hdferr)
+ CALL h5aread_char_scalar_fix(attr_id, memtype_id, buf, LEN(buf), hdferr)
END SUBROUTINE h5aread_char_scalar
- SUBROUTINE h5aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, dims, hdferr)
+ SUBROUTINE h5aread_char_scalar_fix(attr_id, memtype_id, buf, buf_len, hdferr)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: attr_id ! Attribute identifier
INTEGER(HID_T), INTENT(IN) :: memtype_id ! Attribute datatype
! identifier (in memory)
- INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims ! Array to story buf dimension sizes
INTEGER, INTENT(IN) :: buf_len
CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Attribute data
INTEGER, INTENT(OUT) :: hdferr ! Error code
diff --git a/fortran/src/H5Df.c b/fortran/src/H5Df.c
index deab4f3..799f40a 100644
--- a/fortran/src/H5Df.c
+++ b/fortran/src/H5Df.c
@@ -1712,7 +1712,7 @@ nh5dread_vl_integer_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_s
size_t max_len;
hvl_t *c_buf;
- size_t i;
+ hssize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
@@ -2027,7 +2027,7 @@ nh5dread_vl_real_c ( hid_t_f *dset_id , hid_t_f *mem_type_id, hid_t_f *mem_spac
size_t max_len;
hvl_t *c_buf;
- size_t i;
+ hssize_t i;
hssize_t num_elem;
c_dset_id = (hid_t)*dset_id;
diff --git a/fortran/src/H5Dff_F03.f90 b/fortran/src/H5Dff_F03.f90
index be4bd69..d39c200 100644
--- a/fortran/src/H5Dff_F03.f90
+++ b/fortran/src/H5Dff_F03.f90
@@ -273,7 +273,8 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: i,j
+ INTEGER :: i
+ INTEGER(HSIZE_T) :: j
TYPE(C_PTR) :: f_ptr
INTERFACE
INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,&
@@ -1214,10 +1215,10 @@ CONTAINS
INTEGER(HID_T) :: xfer_prp_default
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- TYPE(C_PTR) :: f_ptr
INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: i,j
+ INTEGER :: i
+ INTEGER(HSIZE_T) :: j
INTERFACE
INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,&
mem_space_id_default, &
@@ -1538,18 +1539,25 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
- CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), dims, hdferr, &
- mem_space_id, file_space_id, xfer_prp)
+ xfer_prp_default = H5P_DEFAULT_F
+ mem_space_id_default = H5S_ALL_F
+ file_space_id_default = H5S_ALL_F
+
+ IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
+ IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
+ IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
+
+ CALL h5dread_char_scalar_fix(dset_id, mem_type_id, buf, LEN(buf), hdferr, &
+ mem_space_id_default, file_space_id_default, xfer_prp_default)
END SUBROUTINE h5dread_char_scalar
- SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, dims, hdferr, &
+ SUBROUTINE h5dread_char_scalar_fix(dset_id, mem_type_id, buf, buf_len, hdferr, &
mem_space_id, file_space_id, xfer_prp)
USE, INTRINSIC :: ISO_C_BINDING
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: dset_id ! Dataset identifier
INTEGER(HID_T), INTENT(IN) :: mem_type_id ! Memory datatype identifier
- INTEGER(HSIZE_T), INTENT(IN), DIMENSION(*) :: dims
INTEGER, INTENT(IN) :: buf_len
CHARACTER(LEN=buf_len), INTENT(INOUT), TARGET :: buf ! Data buffer
INTEGER, INTENT(OUT) :: hdferr ! Error code
@@ -1557,23 +1565,12 @@ CONTAINS
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: file_space_id ! File dataspace identfier
INTEGER(HID_T), OPTIONAL, INTENT(IN) :: xfer_prp ! Transfer property list identifier
- INTEGER(HID_T) :: xfer_prp_default
- INTEGER(HID_T) :: mem_space_id_default
- INTEGER(HID_T) :: file_space_id_default
TYPE(C_PTR) :: f_ptr
- xfer_prp_default = H5P_DEFAULT_F
- mem_space_id_default = H5S_ALL_F
- file_space_id_default = H5S_ALL_F
-
- IF(PRESENT(xfer_prp)) xfer_prp_default = xfer_prp
- IF(PRESENT(mem_space_id)) mem_space_id_default = mem_space_id
- IF(PRESENT(file_space_id)) file_space_id_default = file_space_id
-
f_ptr = C_LOC(buf(1:1))
- hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id_default, &
- file_space_id_default, xfer_prp_default, f_ptr)
+ hdferr = h5dread_f_c(dset_id, mem_type_id, mem_space_id, &
+ file_space_id, xfer_prp, f_ptr)
END SUBROUTINE h5dread_char_scalar_fix
diff --git a/fortran/src/H5Dff_F90.f90 b/fortran/src/H5Dff_F90.f90
index 46ea3ad..66cfe62 100644
--- a/fortran/src/H5Dff_F90.f90
+++ b/fortran/src/H5Dff_F90.f90
@@ -181,7 +181,7 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: j
+ INTEGER(HSIZE_T) :: j
INTERFACE
INTEGER FUNCTION h5dread_ref_obj_c(dset_id, mem_type_id,&
@@ -240,7 +240,8 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: i,j
+ INTEGER :: i
+ INTEGER(HSIZE_T) :: j
INTERFACE
INTEGER FUNCTION h5dread_ref_reg_c(dset_id, mem_type_id,&
@@ -1508,7 +1509,7 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
INTEGER(HADDR_T), ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: j
+ INTEGER(HSIZE_T) :: j
INTERFACE
INTEGER FUNCTION h5dwrite_ref_obj_c(dset_id, mem_type_id,&
@@ -1567,7 +1568,8 @@ CONTAINS
INTEGER(HID_T) :: mem_space_id_default
INTEGER(HID_T) :: file_space_id_default
INTEGER, ALLOCATABLE, DIMENSION(:) :: ref_buf
- INTEGER :: i,j
+ INTEGER :: i
+ INTEGER(HSIZE_T) :: j
INTERFACE
INTEGER FUNCTION h5dwrite_ref_reg_c(dset_id, mem_type_id,&
diff --git a/fortran/src/H5Off_F03.f90 b/fortran/src/H5Off_F03.f90
index 0cf4d46..cfb7d56 100644
--- a/fortran/src/H5Off_F03.f90
+++ b/fortran/src/H5Off_F03.f90
@@ -205,7 +205,6 @@ CONTAINS
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
!*****
- INTEGER :: corder_valid
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
TYPE(C_PTR) :: ptr
@@ -329,7 +328,6 @@ CONTAINS
INTEGER , INTENT(OUT) :: hdferr
INTEGER(HID_T) , INTENT(IN) , OPTIONAL :: lapl_id
!*****
- INTEGER :: corder_valid
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
TYPE(C_PTR) :: ptr
@@ -418,7 +416,6 @@ CONTAINS
INTEGER(SIZE_T) :: namelen
INTEGER(HID_T) :: lapl_id_default
- TYPE(C_PTR) :: ptr
INTERFACE
INTEGER FUNCTION h5ovisit_by_name_c(loc_id, object_name, namelen, index_type, order, &
diff --git a/fortran/src/H5Pff.f90 b/fortran/src/H5Pff.f90
index a3c9a60..18ad784 100644
--- a/fortran/src/H5Pff.f90
+++ b/fortran/src/H5Pff.f90
@@ -5977,7 +5977,7 @@ SUBROUTINE h5pset_fapl_direct_f(fapl_id, alignment, block_size, cbuf_size, hdfer
INTEGER(HID_T), INTENT(IN) :: fapl_id ! File access property list identifier
INTEGER(SIZE_T), INTENT(OUT) :: alignment ! Required memory alignment boundary!
INTEGER(SIZE_T), INTENT(OUT) :: block_size ! File system block size
- INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size
+ INTEGER(SIZE_T), INTENT(OUT) :: cbuf_size ! Copy buffer size
INTEGER, INTENT(OUT) :: hdferr ! Error code
! 0 on success and -1 on failure
!*****
diff --git a/fortran/src/H5Rff_F03.f90 b/fortran/src/H5Rff_F03.f90
index 7a9b080..e0ffa0a 100644
--- a/fortran/src/H5Rff_F03.f90
+++ b/fortran/src/H5Rff_F03.f90
@@ -238,7 +238,6 @@ CONTAINS
INTEGER(HID_T), INTENT(OUT) :: space_id ! Space identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
- INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
hdferr = h5rget_region_ptr_c(dset_id, ref, space_id )
@@ -441,7 +440,6 @@ CONTAINS
INTEGER(HID_T), INTENT(OUT) :: ref_obj_id ! Object identifier
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
- INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
TYPE(C_PTR) :: f_ptr
f_ptr = C_LOC(ref)
@@ -567,7 +565,6 @@ CONTAINS
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
- INTEGER(HADDR_T) :: ref_f ! Local buffer to pass reference
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
@@ -615,7 +612,6 @@ CONTAINS
CHARACTER(LEN=*), INTENT(OUT) :: name
INTEGER, INTENT(OUT) :: hdferr
!*****
- INTEGER :: ref_f(REF_REG_BUF_LEN) ! Local buffer to pass reference
INTEGER(SIZE_T) :: size_default
INTEGER(SIZE_T) :: name_len
TYPE(C_PTR) :: f_ptr
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index a944e20..8e17026 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -575,7 +575,7 @@ nh5sget_simple_extent_npoints_c ( hid_t_f *space_id , hsize_t_f *npoints )
{
int ret_value = 0;
hid_t c_space_id;
- hsize_t c_npoints;
+ hssize_t c_npoints;
c_space_id = *space_id;
c_npoints = H5Sget_simple_extent_npoints(c_space_id);
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 510beaa..1aa883e 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..da1837a 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,12 +354,16 @@ 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$ATTRIBUTES DLLEXPORT :: /H5D_SIZE_FLAGS/
!DEC$endif
COMMON /H5D_FLAGS/ H5D_flags
+ COMMON /H5D_SIZE_FLAGS/ H5D_size_flags
INTEGER :: H5D_COMPACT_F
INTEGER :: H5D_CONTIGUOUS_F
@@ -390,8 +394,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 +427,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 +467,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 +500,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 +526,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 +676,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 +692,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 +708,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 +771,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 +852,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 c533452..ae848bf 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -1256,9 +1256,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,
diff --git a/fortran/src/H5test_kind_SIZEOF.f90 b/fortran/src/H5test_kind_SIZEOF.f90
index 867ec1e..7a58b0e 100644
--- a/fortran/src/H5test_kind_SIZEOF.f90
+++ b/fortran/src/H5test_kind_SIZEOF.f90
@@ -49,6 +49,10 @@ PROGRAM test_kind
INTEGER :: ji, jr, jd
last = -1
ii = 0
+
+ ikind_numbers = 0
+ rkind_numbers = 0
+
DO i = 1,100
j = SELECTED_INT_KIND(i)
IF(j .NE. last) THEN
@@ -114,30 +118,20 @@ WRITE(*,'(40(A,/))') &
'!',&
'!*****'
-! Generate a program
- WRITE(*,*) "PROGRAM int_kind"
- WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """
- ji = 0
- WRITE(*, "("" CALL i"", i2.2,""()"")") ji
- jr = 0
- WRITE(*, "("" CALL r"", i2.2,""()"")") jr
- jd = 0
- WRITE(*, "("" CALL d"", i2.2,""()"")") jd
- DO i = 1, ii
- j = ikind_numbers(i)
- WRITE(*, "("" CALL i"", i2.2,""()"")") j
- ENDDO
- DO i = 1, ir
- j = rkind_numbers(i)
- WRITE(*, "("" CALL r"", i2.2,""()"")") j
- ENDDO
- WRITE(*,*) "END PROGRAM int_kind"
+! GENERATE A PROGRAM
+!
+! (a) Generate the module
+
+ WRITE(*,*) "MODULE H5test_kind_SIZEOF_mod"
+ WRITE(*,*) "USE ISO_C_BINDING"
+ WRITE(*,*) "IMPLICIT NONE"
+ WRITE(*,*) "CONTAINS"
j = 0
ji = KIND(1)
WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,*)" INTEGER :: a"
- WRITE(*,*)" INTEGER :: a_size"
+ WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size"
WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2"
WRITE(*,*)" a_size = SIZEOF(a)"
WRITE(*,*)" WRITE(ichr2,'(I2)') a_size"
@@ -151,7 +145,7 @@ WRITE(*,'(40(A,/))') &
WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") jr
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,*)" REAL :: a"
- WRITE(*,*)" INTEGER :: a_size"
+ WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size"
WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2"
WRITE(*,*)" a_size = SIZEOF(a)"
WRITE(*,*)" WRITE(ichr2,'(I2)') a_size"
@@ -165,7 +159,7 @@ WRITE(*,'(40(A,/))') &
WRITE(*, "("" SUBROUTINE d"", i2.2,""()"")") jd
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,*)" DOUBLE PRECISION :: a"
- WRITE(*,*)" INTEGER :: a_size"
+ WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size"
WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2"
WRITE(*,*)" a_size = SIZEOF(a)"
WRITE(*,*)" WRITE(ichr2,'(I2)') a_size"
@@ -179,7 +173,7 @@ WRITE(*,'(40(A,/))') &
WRITE(*, "("" SUBROUTINE i"", i2.2,""()"")") j
WRITE(*,*)" IMPLICIT NONE"
WRITE(*,'(A,I0,A)')" INTEGER(KIND=",j,") :: a"
- WRITE(*,*)" INTEGER :: a_size"
+ WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size"
WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2"
WRITE(*,*)" a_size = SIZEOF(a)"
WRITE(*,*)" WRITE(ichr2,'(I2)') a_size"
@@ -193,8 +187,8 @@ WRITE(*,'(40(A,/))') &
j = rkind_numbers(i)
WRITE(*, "("" SUBROUTINE r"", i2.2,""()"")") j
WRITE(*,*)" IMPLICIT NONE"
- WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a"
- WRITE(*,*)" INTEGER :: a_size"
+ WRITE(*,'(A,I0,A)')" REAL(KIND= ",j,") :: a"
+ WRITE(*,*)" INTEGER(C_SIZE_T) :: a_size"
WRITE(*,*)" CHARACTER(LEN=2) :: ichr2, jchr2"
WRITE(*,*)" a_size = SIZEOF(a)"
WRITE(*,*)" WRITE(ichr2,'(I2)') a_size"
@@ -204,6 +198,30 @@ WRITE(*,'(40(A,/))') &
WRITE(*,*)" RETURN"
WRITE(*,*)"END SUBROUTINE"
ENDDO
+ WRITE(*,*) "END MODULE H5test_kind_SIZEOF_mod"
+ WRITE(*,*) ""
+
+ ! (b) generate the main program
+
+ WRITE(*,*) "PROGRAM H5test_kind_SIZEOF"
+ WRITE(*,*) "USE H5test_kind_SIZEOF_mod"
+ WRITE(*,*) "WRITE(*,*) "" /*generating header file*/ """
+ ji = 0
+ WRITE(*, "("" CALL i"", i2.2,""()"")") ji
+ jr = 0
+ WRITE(*, "("" CALL r"", i2.2,""()"")") jr
+ jd = 0
+ WRITE(*, "("" CALL d"", i2.2,""()"")") jd
+ DO i = 1, ii
+ j = ikind_numbers(i)
+ WRITE(*, "("" CALL i"", i2.2,""()"")") j
+ ENDDO
+ DO i = 1, ir
+ j = rkind_numbers(i)
+ WRITE(*, "("" CALL r"", i2.2,""()"")") j
+ ENDDO
+ WRITE(*,*) "END PROGRAM H5test_kind_SIZEOF"
+
END PROGRAM test_kind
diff --git a/fortran/src/HDF5mpio.f90 b/fortran/src/HDF5mpio.f90
index ac4d2b1..b8fb645 100644
--- a/fortran/src/HDF5mpio.f90
+++ b/fortran/src/HDF5mpio.f90
@@ -28,6 +28,7 @@
MODULE HDF5
USE H5GLOBAL
USE H5F
+ USE H5F_PROVISIONAL
USE H5G
USE H5E
USE H5E_PROVISIONAL
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 2d597c6..d56df0d 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -180,9 +180,9 @@ H5fortran_detect.f90: H5test_kind$(EXEEXT)
# how to compile a fortran program given its sources.
if FORTRAN_HAVE_SIZEOF
- H5test_kind_SOURCES = $(srcdir)/H5test_kind_SIZEOF.f90
+ H5test_kind_SOURCES = H5test_kind_SIZEOF.f90
else
- H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90
+ H5test_kind_SOURCES = H5test_kind.f90
endif
# Mark this directory as part of the Fortran API
diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in
index 2e3725b..0601cdf 100644
--- a/fortran/src/Makefile.in
+++ b/fortran/src/Makefile.in
@@ -162,8 +162,7 @@ H5fortran_detect_LDADD = $(LDADD)
H5match_types_SOURCES = H5match_types.c
H5match_types_OBJECTS = H5match_types.$(OBJEXT)
H5match_types_LDADD = $(LDADD)
-am__H5test_kind_SOURCES_DIST = $(srcdir)/H5test_kind.f90 \
- $(srcdir)/H5test_kind_SIZEOF.f90
+am__H5test_kind_SOURCES_DIST = H5test_kind.f90 H5test_kind_SIZEOF.f90
@FORTRAN_HAVE_SIZEOF_FALSE@am_H5test_kind_OBJECTS = \
@FORTRAN_HAVE_SIZEOF_FALSE@ H5test_kind.$(OBJEXT)
@FORTRAN_HAVE_SIZEOF_TRUE@am_H5test_kind_OBJECTS = \
@@ -590,11 +589,11 @@ BUILT_SOURCES = H5f90i_gen.h
# Automake knows how to build fortran programs if we tell it the source
# files.
H5fortran_detect_SOURCES = H5fortran_detect.f90
-@FORTRAN_HAVE_SIZEOF_FALSE@H5test_kind_SOURCES = $(srcdir)/H5test_kind.f90
+@FORTRAN_HAVE_SIZEOF_FALSE@H5test_kind_SOURCES = H5test_kind.f90
# H5test_kind.f90 is included in the distribution, and Automake knows
# how to compile a fortran program given its sources.
-@FORTRAN_HAVE_SIZEOF_TRUE@H5test_kind_SOURCES = $(srcdir)/H5test_kind_SIZEOF.f90
+@FORTRAN_HAVE_SIZEOF_TRUE@H5test_kind_SOURCES = H5test_kind_SIZEOF.f90
# Mark this directory as part of the Fortran API
FORTRAN_API = yes
@@ -765,18 +764,6 @@ distclean-compile:
.f90.lo:
$(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $<
-H5test_kind.o: $(srcdir)/H5test_kind.f90
- $(AM_V_FC)$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind.o $(FCFLAGS_f90) `test -f '$(srcdir)/H5test_kind.f90' || echo '$(srcdir)/'`$(srcdir)/H5test_kind.f90
-
-H5test_kind.obj: $(srcdir)/H5test_kind.f90
- $(AM_V_FC)$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind.obj $(FCFLAGS_f90) `if test -f '$(srcdir)/H5test_kind.f90'; then $(CYGPATH_W) '$(srcdir)/H5test_kind.f90'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/H5test_kind.f90'; fi`
-
-H5test_kind_SIZEOF.o: $(srcdir)/H5test_kind_SIZEOF.f90
- $(AM_V_FC)$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind_SIZEOF.o $(FCFLAGS_f90) `test -f '$(srcdir)/H5test_kind_SIZEOF.f90' || echo '$(srcdir)/'`$(srcdir)/H5test_kind_SIZEOF.f90
-
-H5test_kind_SIZEOF.obj: $(srcdir)/H5test_kind_SIZEOF.f90
- $(AM_V_FC)$(FC) $(AM_FCFLAGS) $(FCFLAGS) -c -o H5test_kind_SIZEOF.obj $(FCFLAGS_f90) `if test -f '$(srcdir)/H5test_kind_SIZEOF.f90'; then $(CYGPATH_W) '$(srcdir)/H5test_kind_SIZEOF.f90'; else $(CYGPATH_W) '$(srcdir)/$(srcdir)/H5test_kind_SIZEOF.f90'; fi`
-
mostlyclean-libtool:
-rm -f *.lo