summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt8
-rw-r--r--fortran/test/Makefile.am14
-rw-r--r--fortran/test/Makefile.in35
-rw-r--r--fortran/test/tH5P_F03.f9023
-rw-r--r--fortran/test/tH5T_F03.f9013
-rw-r--r--fortran/test/tf.f904
-rw-r--r--fortran/test/tf_F03.f90126
-rw-r--r--fortran/test/tf_F08.f90139
8 files changed, 330 insertions, 32 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 28b2ae1..7c31fe4 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -21,7 +21,13 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf.f90)
+if (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+ add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F08.f90 tf.f90)
+else (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+ add_library (${HDF5_F90_TEST_LIB_TARGET} ${LIB_TYPE} tf_F03.f90 tf.f90)
+endif (FORTRAN_HAVE_STORAGE_SIZE AND FORTRAN_HAVE_C_SIZEOF)
+
+
set (SHARED_LINK_FLAGS " ")
if (WIN32)
if (BUILD_SHARED_LIBS)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index c0b5395..9a04106 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -53,7 +53,19 @@ endif
check_PROGRAMS=$(TEST_PROG)
-libh5test_fortran_la_SOURCES= tf.f90 t.c
+if FORTRAN_HAVE_STORAGE_SIZE
+if FORTRAN_HAVE_C_SIZEOF
+ libh5test_fortran_la_SOURCES = tf_F08.f90
+else
+ libh5test_fortran_la_SOURCES = tf_F03.f90
+endif
+else
+ libh5test_fortran_la_SOURCES = tf_F03.f90
+endif
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+libh5test_fortran_la_SOURCES += tf.f90 t.c
# Source files are used for both the library and fortranlib_test.
# Automake will complain about this without the following workaround.
diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in
index 89db8f4..42eecef 100644
--- a/fortran/test/Makefile.in
+++ b/fortran/test/Makefile.in
@@ -101,7 +101,16 @@ CONFIG_CLEAN_FILES =
CONFIG_CLEAN_VPATH_FILES =
LTLIBRARIES = $(noinst_LTLIBRARIES)
libh5test_fortran_la_LIBADD =
-am_libh5test_fortran_la_OBJECTS = tf.lo t.lo
+am__libh5test_fortran_la_SOURCES_DIST = tf_F03.f90 tf.f90 t.c \
+ tf_F08.f90
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F03.lo \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@am_libh5test_fortran_la_OBJECTS = tf_F08.lo \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.lo \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.lo
+@FORTRAN_HAVE_STORAGE_SIZE_FALSE@am_libh5test_fortran_la_OBJECTS = \
+@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf_F03.lo tf.lo t.lo
libh5test_fortran_la_OBJECTS = $(am_libh5test_fortran_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -213,9 +222,9 @@ am__v_FCLD_1 =
SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \
$(fflush2_SOURCES) $(fortranlib_test_SOURCES) \
$(fortranlib_test_1_8_SOURCES) $(fortranlib_test_F03_SOURCES)
-DIST_SOURCES = $(libh5test_fortran_la_SOURCES) $(fflush1_SOURCES) \
- $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \
- $(fortranlib_test_1_8_SOURCES) \
+DIST_SOURCES = $(am__libh5test_fortran_la_SOURCES_DIST) \
+ $(fflush1_SOURCES) $(fflush2_SOURCES) \
+ $(fortranlib_test_SOURCES) $(fortranlib_test_1_8_SOURCES) \
$(am__fortranlib_test_F03_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
@@ -739,7 +748,23 @@ noinst_LTLIBRARIES = libh5test_fortran.la
# Our main targets, the tests themselves
TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 \
$(am__append_2)
-libh5test_fortran_la_SOURCES = tf.f90 t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F03.f90 \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \
+@FORTRAN_HAVE_C_SIZEOF_FALSE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@libh5test_fortran_la_SOURCES = tf_F08.f90 \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ tf.f90 \
+@FORTRAN_HAVE_C_SIZEOF_TRUE@@FORTRAN_HAVE_STORAGE_SIZE_TRUE@ t.c
+
+# tf.f90 depends on either tf_F08.f90 or tf_F03.f90 so they need to be
+# compiled first
+@FORTRAN_HAVE_STORAGE_SIZE_FALSE@libh5test_fortran_la_SOURCES = \
+@FORTRAN_HAVE_STORAGE_SIZE_FALSE@ tf_F03.f90 tf.f90 t.c
# Source files are used for both the library and fortranlib_test.
# Automake will complain about this without the following workaround.
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90
index 6039a52..0f2f3de 100644
--- a/fortran/test/tH5P_F03.f90
+++ b/fortran/test/tH5P_F03.f90
@@ -106,20 +106,12 @@ SUBROUTINE test_create(total_error)
INTEGER(hsize_t), DIMENSION(1:5), PARAMETER :: ch_size= (/1, 1, 1, 4, 1/)
CHARACTER(LEN=14) :: filename ='test_create.h5'
- ! /* compound datatype operations */
- TYPE, BIND(C) :: comp_datatype
- REAL :: a
- INTEGER :: x
- DOUBLE PRECISION :: y
- CHARACTER(LEN=1) :: z
- END TYPE comp_datatype
-
TYPE(comp_datatype), TARGET :: rd_c, fill_ctype
INTEGER :: error
INTEGER(SIZE_T) :: h5off
TYPE(C_PTR) :: f_ptr
LOGICAL :: differ1, differ2
-
+
!/*
! * Create a file.
! */
@@ -136,8 +128,7 @@ SUBROUTINE test_create(total_error)
CALL check("h5pset_chunk_f",error, total_error)
! /* Create a compound datatype */
-
- CALL h5tcreate_f(H5T_COMPOUND_F, INT(SIZEOF(fill_ctype),size_t), comp_type_id, error)
+ CALL h5tcreate_f(H5T_COMPOUND_F, H5_SIZEOF(fill_ctype), comp_type_id, error)
CALL check("h5tcreate_f", error, total_error)
h5off = H5OFFSETOF(C_LOC(fill_ctype), C_LOC(fill_ctype%a))
CALL h5tinsert_f(comp_type_id, "a", h5off , H5T_NATIVE_REAL, error)
@@ -412,7 +403,7 @@ SUBROUTINE test_h5p_file_image(total_error)
! Set file image
f_ptr = C_LOC(buffer(1))
- size = SIZEOF(buffer)
+ size = H5_SIZEOF(buffer)
CALL h5pset_file_image_f(fapl_1, f_ptr, size, error)
CALL check("h5pset_file_image_f", error, total_error)
@@ -505,13 +496,13 @@ SUBROUTINE external_test_offset(cleanup,total_error)
! Create the dataset
CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error)
CALL check("h5pcreate_f", error, total_error)
- CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(H5_SIZEOF(part), hsize_t), error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(H5_SIZEOF(part), hsize_t), error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(H5_SIZEOF(part), hsize_t), error)
CALL check("h5pset_external_f",error,total_error)
- CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(SIZEOF(part), hsize_t), error)
+ CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(H5_SIZEOF(part), hsize_t), error)
CALL check("h5pset_external_f",error,total_error)
cur_size(1) = 100
diff --git a/fortran/test/tH5T_F03.f90 b/fortran/test/tH5T_F03.f90
index fc3ebd0..f15424d 100644
--- a/fortran/test/tH5T_F03.f90
+++ b/fortran/test/tH5T_F03.f90
@@ -661,9 +661,6 @@ END SUBROUTINE test_array_compound_atomic
USE ISO_C_BINDING
IMPLICIT NONE
- INTEGER, PARAMETER :: r_k4 = SELECTED_REAL_KIND(5)
- INTEGER, PARAMETER :: r_k8 = SELECTED_REAL_KIND(10)
-
INTEGER, INTENT(INOUT) :: total_error
INTEGER, PARAMETER :: LENGTH = 5
@@ -685,8 +682,8 @@ END SUBROUTINE test_array_compound_atomic
TYPE CmpField_struct
INTEGER, DIMENSION(1:ALEN) :: a
- REAL(KIND=r_k4), DIMENSION(1:ALEN) :: b
- REAL(KIND=r_k8), DIMENSION(1:ALEN) :: c
+ REAL(KIND=sp), DIMENSION(1:ALEN) :: b
+ REAL(KIND=dp), DIMENSION(1:ALEN) :: c
ENDTYPE CmpField_struct
TYPE(CmpField_struct), DIMENSION(1:LENGTH), TARGET :: cf
@@ -702,7 +699,7 @@ END SUBROUTINE test_array_compound_atomic
TYPE(CmpDTSinfo_struct) :: dtsinfo
TYPE fld_t_struct
- REAL(KIND=r_k4), DIMENSION(1:ALEN) :: b
+ REAL(KIND=sp), DIMENSION(1:ALEN) :: b
END TYPE fld_t_struct
INTEGER(SIZE_T) :: type_sizei ! Size of the integer datatype
@@ -741,10 +738,10 @@ END SUBROUTINE test_array_compound_atomic
! -----------------------
CALL h5tget_size_f(H5T_NATIVE_INTEGER, type_sizei, error)
CALL check("h5tget_size_f", error, total_error)
- IF(sizeof(cf(1)%b(1)).EQ.4)THEN
+ IF(h5_sizeof(cf(1)%b(1)).EQ.4_size_t)THEN
CALL h5tget_size_f(H5T_NATIVE_REAL_4, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
- ELSE IF(sizeof(cf(1)%b(1)).EQ.8)THEN
+ ELSE IF(h5_sizeof(cf(1)%b(1)).EQ.8_size_t)THEN
CALL h5tget_size_f(H5T_NATIVE_REAL_8, type_sizer, error)
CALL check("h5tget_size_f", error, total_error)
ENDIF
diff --git a/fortran/test/tf.f90 b/fortran/test/tf.f90
index 2964840..063e93d 100644
--- a/fortran/test/tf.f90
+++ b/fortran/test/tf.f90
@@ -29,7 +29,9 @@
!*****
MODULE TH5_MISC
- INTEGER, PARAMETER :: dp = SELECTED_REAL_KIND(15, 307)
+ USE TH5_MISC_PROVISIONAL
+
+ IMPLICIT NONE
CONTAINS
diff --git a/fortran/test/tf_F03.f90 b/fortran/test/tf_F03.f90
new file mode 100644
index 0000000..365879a
--- /dev/null
+++ b/fortran/test/tf_F03.f90
@@ -0,0 +1,126 @@
+!****h* root/fortran/test/tf_F08.f90
+!
+! NAME
+! tf_F08.f90
+!
+! FUNCTION
+! Contains Functions that are part of the F2008 standard and needed by
+! the hdf5 fortran tests.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! CONTAINS SUBROUTINES
+! H5_SIZEOF
+!
+!*****
+MODULE TH5_MISC_PROVISIONAL
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: sp = KIND(0.0)
+ INTEGER, PARAMETER :: dp = KIND(0.D0)
+
+ ! generic compound datatype
+ TYPE, BIND(C) :: comp_datatype
+ REAL :: a
+ INTEGER :: x
+ DOUBLE PRECISION :: y
+ CHARACTER(LEN=1) :: z
+ END TYPE comp_datatype
+
+ PUBLIC :: H5_SIZEOF
+ INTERFACE H5_SIZEOF
+ MODULE PROCEDURE H5_SIZEOF_CMPD
+ MODULE PROCEDURE H5_SIZEOF_CHR
+ MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_IV
+ MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP
+ END INTERFACE
+
+CONTAINS
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_cmpd
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
+ IMPLICIT NONE
+ TYPE(comp_datatype), INTENT(in) :: a
+
+ H5_SIZEOF_CMPD = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CMPD
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_chr
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(in):: a
+
+ H5_SIZEOF_CHR = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CHR
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_i
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
+ IMPLICIT NONE
+ INTEGER, INTENT(in):: a
+
+ H5_SIZEOF_I = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_I
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_iv
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_IV(a)
+ IMPLICIT NONE
+ INTEGER, DIMENSION(:), INTENT(in):: a
+
+ H5_SIZEOF_IV = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_IV
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_sp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
+ IMPLICIT NONE
+ REAL(sp), INTENT(in):: a
+
+ H5_SIZEOF_SP = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_SP
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_dp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)
+ IMPLICIT NONE
+ REAL(dp), INTENT(in):: a
+
+ H5_SIZEOF_DP = SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_DP
+
+END MODULE TH5_MISC_PROVISIONAL
diff --git a/fortran/test/tf_F08.f90 b/fortran/test/tf_F08.f90
new file mode 100644
index 0000000..3ad2820
--- /dev/null
+++ b/fortran/test/tf_F08.f90
@@ -0,0 +1,139 @@
+!****h* root/fortran/test/tf_F08.f90
+!
+! NAME
+! tf_F08.f90
+!
+! FUNCTION
+! Contains functions that are part of the F2008 standard and needed by
+! the hdf5 fortran tests.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the files COPYING and Copyright.html. COPYING can be found at the root *
+! of the source code distribution tree; Copyright.html can be found at the *
+! root level of an installed copy of the electronic HDF5 document set and *
+! is linked from the top-level documents page. It can also be found at *
+! http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+! access to either file, you may request a copy from help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! CONTAINS SUBROUTINES
+! H5_SIZEOF
+!
+! NOTES
+! This file contains "sizeof" functions that are F2008 standard compliant
+! and replace the non-standard 'SIZEOF' functions found in the file tf_F03.
+! Unfortunity we need to wrap the C_SIZEOF/STORAGE_SIZE functions to handle different
+! data types from the various tests.
+!
+! F08+TS29113 requires C interoperable variable as argument for C_SIZEOF.
+!
+! This file will be build instead of tf_F03.f90 if the intrinsic fortran
+! function C_SIZEOF/STORAGE_SIZE is found during configure.
+!
+!*****
+MODULE TH5_MISC_PROVISIONAL
+
+ USE ISO_C_BINDING
+ IMPLICIT NONE
+
+ INTEGER, PARAMETER :: sp = KIND(0.0)
+ INTEGER, PARAMETER :: dp = KIND(0.D0)
+
+ ! generic compound datatype
+ TYPE, BIND(C) :: comp_datatype
+ REAL :: a
+ INTEGER :: x
+ DOUBLE PRECISION :: y
+ CHARACTER(LEN=1) :: z
+ END TYPE comp_datatype
+
+ PUBLIC :: H5_SIZEOF
+ INTERFACE H5_SIZEOF
+ MODULE PROCEDURE H5_SIZEOF_CMPD
+ MODULE PROCEDURE H5_SIZEOF_CHR
+ MODULE PROCEDURE H5_SIZEOF_I, H5_SIZEOF_IV
+ MODULE PROCEDURE H5_SIZEOF_SP,H5_SIZEOF_DP
+ END INTERFACE
+
+CONTAINS
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_cmpd
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CMPD(a)
+ IMPLICIT NONE
+ TYPE(comp_datatype), INTENT(in) :: a
+
+ H5_SIZEOF_CMPD = C_SIZEOF(a)
+
+ END FUNCTION H5_SIZEOF_CMPD
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_chr
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_CHR(a)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(in) :: a
+
+ H5_SIZEOF_CHR = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_CHR
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_i
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_I(a)
+ IMPLICIT NONE
+ INTEGER, INTENT(in):: a
+
+ H5_SIZEOF_I = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_I
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_iv
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_IV(a)
+ IMPLICIT NONE
+ INTEGER, DIMENSION(:), INTENT(in):: a
+
+ H5_SIZEOF_IV = SIZE(a)*storage_size(a(1), c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_IV
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_sp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_SP(a)
+ IMPLICIT NONE
+ REAL(sp), INTENT(in):: a
+
+ H5_SIZEOF_SP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_SP
+
+!This definition is needed for Windows DLLs
+!DEC$if defined(BUILD_HDF5_DLL)
+!DEC$attributes dllexport :: h5_sizeof_dp
+!DEC$endif
+ INTEGER(C_SIZE_T) FUNCTION H5_SIZEOF_DP(a)
+ IMPLICIT NONE
+ REAL(dp), INTENT(in):: a
+
+ H5_SIZEOF_DP = storage_size(a, c_size_t)/storage_size(c_char_'a',c_size_t)
+
+ END FUNCTION H5_SIZEOF_DP
+
+END MODULE TH5_MISC_PROVISIONAL