From 4d500d49023156f1f8ef60375e63ac22e79e1749 Mon Sep 17 00:00:00 2001 From: Scot Breitenfeld Date: Wed, 3 Jun 2015 09:13:58 -0500 Subject: [svn-r27140] fixed interger*16 support --- Makefile.in | 1 + c++/Makefile.in | 1 + c++/examples/Makefile.in | 1 + c++/src/Makefile.in | 1 + c++/test/Makefile.in | 1 + configure | 21 ++- configure.ac | 12 +- examples/Makefile.in | 1 + fortran/Makefile.in | 1 + fortran/examples/Makefile.in | 1 + fortran/src/CMakeLists.txt | 52 +++--- fortran/src/H5_f.c | 18 ++- fortran/src/H5_ff.F90 | 8 +- fortran/src/H5config_f.inc.cmake | 28 ++++ fortran/src/H5config_f.inc.in | 12 +- fortran/src/H5fort_type_defines.h.in | 1 + fortran/src/Makefile.in | 1 + fortran/test/CMakeLists.txt | 2 +- fortran/test/Makefile.in | 1 + fortran/test/fflush2.f90 | 297 +++++++++++++++++------------------ fortran/test/tH5T_F03.F90 | 84 +++++----- fortran/testpar/Makefile.in | 1 + hl/Makefile.in | 1 + hl/c++/Makefile.in | 1 + hl/c++/examples/Makefile.in | 1 + hl/c++/src/Makefile.in | 1 + hl/c++/test/Makefile.in | 1 + hl/examples/Makefile.in | 1 + hl/fortran/Makefile.in | 1 + hl/fortran/examples/Makefile.in | 1 + hl/fortran/src/Makefile.in | 1 + hl/fortran/test/Makefile.in | 1 + hl/src/Makefile.in | 1 + hl/test/Makefile.in | 1 + hl/tools/Makefile.in | 1 + hl/tools/gif2h5/Makefile.in | 1 + m4/aclocal_fc.m4 | 5 +- src/H5config.h.in | 3 + src/Makefile.in | 1 + test/Makefile.in | 1 + testpar/Makefile.in | 1 + tools/Makefile.in | 1 + tools/h5copy/Makefile.in | 1 + tools/h5diff/Makefile.in | 1 + tools/h5dump/Makefile.in | 1 + tools/h5import/Makefile.in | 1 + tools/h5jam/Makefile.in | 1 + tools/h5ls/Makefile.in | 1 + tools/h5repack/Makefile.in | 1 + tools/h5stat/Makefile.in | 1 + tools/lib/Makefile.in | 1 + tools/misc/Makefile.in | 1 + tools/perform/Makefile.in | 1 + 53 files changed, 346 insertions(+), 237 deletions(-) diff --git a/Makefile.in b/Makefile.in index 0e1d3e3..09c161c 100644 --- a/Makefile.in +++ b/Makefile.in @@ -305,6 +305,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 42b0f4d..7390f73 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 5568998..aa77f81 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index 16c309f..e637d93 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index cf04ba0..ef150e0 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/configure b/configure index ffb0f1e..b6bf787 100755 --- a/configure +++ b/configure @@ -719,6 +719,7 @@ am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS +HAVE_Fortran_INTEGER_SIZEOF_16 PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF PAC_FORTRAN_NATIVE_DOUBLE_KIND PAC_FORTRAN_NATIVE_REAL_SIZEOF @@ -6970,7 +6971,7 @@ rm -f core conftest.err conftest.$ac_objext \ ## See if C_LONG_DOUBLE is available, and if it is different from C_DOUBLE - HAVE_C_LONG_DOUBLE_FORTRAN="no" + FORTRAN_HAVE_C_LONG_DOUBLE="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Fortran C_LONG_DOUBLE is valid" >&5 $as_echo_n "checking if Fortran C_LONG_DOUBLE is valid... " >&6; } @@ -7003,7 +7004,7 @@ _ACEOF if ac_fn_fc_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - HAVE_C_LONG_DOUBLE_FORTRAN="yes" + FORTRAN_HAVE_C_LONG_DOUBLE="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -7410,6 +7411,20 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 1" >>confdefs.h + + else + HAVE_Fortran_INTEGER_SIZEOF_16="0" + +$as_echo "#define HAVE_Fortran_INTEGER_SIZEOF_16 0" >>confdefs.h + + fi + ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) ##fi @@ -24733,7 +24748,7 @@ $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi rm -f confcache -## Check for the __FLOAT128 +## Check for __FLOAT128 extension { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __float128" >&5 $as_echo_n "checking for __float128... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext diff --git a/configure.ac b/configure.ac index 09f99e5..d5e0919 100644 --- a/configure.ac +++ b/configure.ac @@ -451,6 +451,16 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([PAC_FORTRAN_NATIVE_REAL_SIZEOF]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_KIND]) AC_SUBST([PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF]) + AC_SUBST([HAVE_Fortran_INTEGER_SIZEOF_16]) + + ## Setting definition if there is a 16 byte fortran integer + if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then + HAVE_Fortran_INTEGER_SIZEOF_16="1" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [1], [Determine if INTEGER*16 is available]) + else + HAVE_Fortran_INTEGER_SIZEOF_16="0" + AC_DEFINE([HAVE_Fortran_INTEGER_SIZEOF_16], [0], [Determine if INTEGER*16 is available]) + fi ##if test $PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF > ${ac_cv_sizeof_long_double}; then ## AC_MSG_ERROR([Fortran default DOUBLE PRECISION ("X$PAC_FORTRAN_NATIVE_DOUBLE_SIZEOF" Bytes) can not be represented in C ]) @@ -1109,7 +1119,7 @@ AC_CHECK_SIZEOF([off64_t], [8]) ## Checkpoint the cache AC_CACHE_SAVE -## Check for the __FLOAT128 +## Check for __FLOAT128 extension AC_MSG_CHECKING([for __float128]) AC_TRY_COMPILE([], [__float128 x;], diff --git a/examples/Makefile.in b/examples/Makefile.in index 90fb879..3140a07 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 3cc4f13..8359314 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index c9b7586..bc82f9f 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -413,6 +413,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index d6e77ba..03db548 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -31,7 +31,7 @@ configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_D #----------------------------------------------------------------------------- # Setup the Fortran auto-detection utilities -# H5test_kind.F90 used to generate H5fortran_detect.F90 and H5_KINDff.F90 +# H5test_kind.F90 used to generate various KIND interfaces # H5fortran_detect.F90 used to generate H5fort_type_defines.h # H5fort_type_defines.h used to generate H5f90i_gen.h + H5fortran_types.F90 #----------------------------------------------------------------------------- @@ -67,31 +67,31 @@ add_custom_command ( DEPENDS H5test_FortranHavekind ) #----------------------------------------------------------------------------- -add_executable (H5fortran_detect - ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 -) -if (WIN32 AND MSVC) - if (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect - PROPERTIES - COMPILE_FLAGS "/MT" - ) - endif (BUILD_SHARED_LIBS) - set_target_properties (H5fortran_detect - PROPERTIES - LINK_FLAGS "/SUBSYSTEM:CONSOLE" - ) -endif (WIN32 AND MSVC) -set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) - -set (CMD $) -add_custom_command ( - OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - COMMAND ${CMD} - ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h - WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} - DEPENDS H5fortran_detect -) +#add_executable (H5fortran_detect +# ${HDF5_F90_BINARY_DIR}/H5fortran_detect.F90 +#) +#if (WIN32 AND MSVC) +# if (BUILD_SHARED_LIBS) +# set_target_properties (H5fortran_detect +# PROPERTIES +# COMPILE_FLAGS "/MT" +# ) +# endif (BUILD_SHARED_LIBS) +# set_target_properties (H5fortran_detect +# PROPERTIES +# LINK_FLAGS "/SUBSYSTEM:CONSOLE" +# ) +#endif (WIN32 AND MSVC) +#set_target_properties (H5fortran_detect PROPERTIES LINKER_LANGUAGE Fortran) +# +#set (CMD $) +#add_custom_command ( +# OUTPUT ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h +# COMMAND ${CMD} +# ARGS > ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h +# WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} +# DEPENDS H5fortran_detect +#) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) #----------------------------------------------------------------------------- diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c index 6a6be41..c12b610 100644 --- a/fortran/src/H5_f.c +++ b/fortran/src/H5_f.c @@ -240,7 +240,7 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[15] = (hid_t_f)H5Tcopy(H5T_NATIVE_B32)) < 0) return ret_value; if ((types[16] = (hid_t_f)H5Tcopy(H5T_NATIVE_B64)) < 0) return ret_value; -/* #ifdef -MSB- */ +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 /* * FIND H5T_NATIVE_INTEGER_16 */ @@ -260,6 +260,10 @@ h5init_types_c( hid_t_f * types, hid_t_f * floatingtypes, hid_t_f * integertypes if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; if ( H5Tset_precision (types[17], 128) < 0) return ret_value; } /*end else */ +#else + if ((types[17] = H5Tcopy (H5T_NATIVE_INT)) < 0) return ret_value; + if ( H5Tset_precision (types[17], 128) < 0) return ret_value; +#endif /* #ifdef -MSB- */ @@ -356,16 +360,16 @@ h5close_types_c( hid_t_f * types, int_f *lentypes, int i; for (i = 0; i < *lentypes; i++) { - c_type_id = types[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = types[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *floatinglen; i++) { - c_type_id = floatingtypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = floatingtypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } for (i = 0; i < *integerlen; i++) { - c_type_id = integertypes[i]; - if ( H5Tclose(c_type_id) < 0) return ret_value; + c_type_id = integertypes[i]; + if ( H5Tclose(c_type_id) < 0) return ret_value; } ret_value = 0; return ret_value; diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90 index 25c7eab..f4090cc 100644 --- a/fortran/src/H5_ff.F90 +++ b/fortran/src/H5_ff.F90 @@ -30,6 +30,8 @@ ! !***** +#include + MODULE H5LIB USE, INTRINSIC :: ISO_C_BINDING, ONLY : c_ptr, C_INTPTR_T @@ -377,9 +379,10 @@ CONTAINS h5_type = H5T_NATIVE_INTEGER_4 ELSE IF(kind.EQ.Fortran_INTEGER_8)THEN h5_type = H5T_NATIVE_INTEGER_8 -! NEED ifdef -MSB- +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 ELSE IF(kind.EQ.Fortran_INTEGER_16)THEN h5_type = H5T_NATIVE_INTEGER_16 +#endif ENDIF ELSE IF(flag.EQ.H5_REAL_KIND)THEN IF(kind.EQ.Fortran_REAL_C_FLOAT)THEN @@ -388,9 +391,10 @@ CONTAINS h5_type = H5T_NATIVE_REAL_C_DOUBLE ELSE IF(kind.EQ.Fortran_REAL_C_LONG_DOUBLE)THEN h5_type = H5T_NATIVE_REAL_C_LONG_DOUBLE -! NEED ifdef -MSB- +#if H5_HAVE_FLOAT128!=0 ELSE IF(kind.EQ.Fortran_REAL_C_FLOAT128)THEN h5_type = H5T_NATIVE_FLOAT_128 +#endif ENDIF ENDIF diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index cbdfb9b..cb1d9e8 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -27,3 +27,31 @@ #if H5_FORTRAN_HAVE_C_SIZEOF==0 #undef H5_FORTRAN_HAVE_C_SIZEOF #endif + +! Define if the intrinsic function FORTRAN_HAVE_C_LONG_DOUBLE exists +#define H5_FORTRAN_HAVE_C_LONG_DOUBLE @FORTRAN_HAVE_C_LONG_DOUBLE@ + +#if H5_FORTRAN_HAVE_C_LONG_DOUBLE==0 +#undef H5_FORTRAN_HAVE_C_LONG_DOUBLE +#endif + +! should this be ${HDF_PREFIX} instead of H5 MSB +#define H5_SIZEOF_LONG_DOUBLE @H5_SIZEOF_LONG_DOUBLE@ + +#if H5_SIZEOF_LONG_DOUBLE==0 +#undef H5_SIZEOF_LONG_DOUBLE +#endif + +! Define if the C intrinsic __FLOAT128 exists +#define H5_HAVE_FLOAT128 @HAVE_FLOAT128@ + +#if H5_HAVE_FLOAT128==0 +#undef H5_HAVE_FLOAT128 +#endif + +! Define if INTEGER*16 is available +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ + +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16==0 +#undef H5_HAVE_Fortran_INTEGER_SIZEOF_16 +#endif diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 0203315..b227c13 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -1,5 +1,8 @@ ! fortran/src/H5config_f.inc. Generated from fortran/src/H5config_f.inc.in by configure +! The script to replace the defines in H5config_f.inc.in is +! located in configure.ac in the Fortran section. + ! Define if we have parallel support #undef HAVE_PARALLEL @@ -19,4 +22,11 @@ #undef HAVE_ISO_FORTRAN_ENV ! Define the size of C's long double -#define H5_SIZEOF_LONG_DOUBLE +#undef SIZEOF_LONG_DOUBLE + +! Define if the C intrinsic __FLOAT128 exists +#undef HAVE_FLOAT128 + +! Define if INTEGER*16 is available +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + diff --git a/fortran/src/H5fort_type_defines.h.in b/fortran/src/H5fort_type_defines.h.in index ad7b666..9e8015c 100644 --- a/fortran/src/H5fort_type_defines.h.in +++ b/fortran/src/H5fort_type_defines.h.in @@ -11,6 +11,7 @@ #define H5_FORTRAN_INTEGER_KINDS_SIZEOF @PAC_FC_ALL_INTEGER_KINDS_SIZEOF@ #define H5_FORTRAN_REAL_KINDS @PAC_FC_ALL_REAL_KINDS@ #define H5_FORTRAN_REAL_KINDS_SIZEOF @PAC_FC_ALL_REAL_KINDS_SIZEOF@ +#define H5_HAVE_Fortran_INTEGER_SIZEOF_16 @HAVE_Fortran_INTEGER_SIZEOF_16@ #define C_LONG_DOUBLE_KIND 10 #define C_LONG_DOUBLE_SIZEOF 12 #define C_DOUBLE_KIND 8 diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 3809775..8aea063 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -514,6 +514,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 7a718f8..d71fefd 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -123,7 +123,7 @@ add_executable (fortranlib_test_F03 tH5L_F03.f90 tH5O_F03.f90 tH5P_F03.f90 - tH5T_F03.f90 + tH5T_F03.F90 tHDF5_F03.f90 ) TARGET_NAMING (fortranlib_test_F03 ${LIB_TYPE}) diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 037ec97..a8a207e 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -525,6 +525,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.f90 index 04ce439..4230832 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.f90 @@ -27,152 +27,151 @@ ! !***** - PROGRAM FFLUSH2EXAMPLE - - USE HDF5 ! This module contains all necessary modules - USE TH5_MISC - - IMPLICIT NONE - - CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" - CHARACTER(LEN=80) :: fix_filename - - ! - !data space rank and dimensions - ! - INTEGER, PARAMETER :: NX = 4 - INTEGER, PARAMETER :: NY = 5 - - ! - ! File identifiers - ! - INTEGER(HID_T) :: file_id - - ! - ! Group identifier - ! - INTEGER(HID_T) :: gid - - ! - ! dataset identifier - ! - INTEGER(HID_T) :: dset_id - - - ! - ! data type identifier - ! - INTEGER(HID_T) :: dtype_id - - ! - !flag to check operation success - ! - INTEGER :: error - - ! - !general purpose integer - ! - INTEGER :: i, j, total_error = 0 - - ! - !data buffers - ! - INTEGER, DIMENSION(NX,NY) :: data_out - INTEGER(HSIZE_T), DIMENSION(2) :: data_dims - data_dims(1) = NX - data_dims(2) = NY - - ! - !Initialize FORTRAN predifined datatypes - ! - CALL h5open_f(error) - CALL check("h5open_f",error,total_error) - - ! - !Open the file. - ! - CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) - if (error .ne. 0) then - write(*,*) "Cannot modify filename" - CALL h5_exit_f (1) - endif - CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) - CALL check("h5fopen_f",error,total_error) - - ! - !Open the dataset - ! - CALL h5dopen_f(file_id, "/D", dset_id, error) - CALL check("h5dopen_f",error,total_error) - - ! - !Get dataset's data type. - ! - CALL h5dget_type_f(dset_id, dtype_id, error) - CALL check("h5dget_type_f",error,total_error) - - ! - !Read the dataset. - ! - CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) - CALL check("h5dread_f",error,total_error) - - ! - !Print the dataset. - ! - do i = 1, NX - write(*,*) (data_out(i,j), j = 1, NY) - end do -! -!result of the print statement -! -! 0, 1, 2, 3, 4 -! 1, 2, 3, 4, 5 -! 2, 3, 4, 5, 6 -! 3, 4, 5, 6, 7 - - ! - !Open the group. - ! - CALL h5gopen_f(file_id, "G", gid, error) - CALL check("h5gopen_f",error,total_error) - - ! - !In case error happens, exit. - ! - IF (error == -1) CALL h5_exit_f (1) - ! - !Close the datatype - ! - CALL h5tclose_f(dtype_id, error) - CALL check("h5tclose_f",error,total_error) - - ! - !Close the dataset. - ! - CALL h5dclose_f(dset_id, error) - CALL check("h5dclose_f",error,total_error) - - ! - !Close the group. - ! - CALL h5gclose_f(gid, error) - CALL check("h5gclose_f",error,total_error) - - ! - !Close the file. - ! - CALL h5fclose_f(file_id, error) - CALL check("h5fclose_f",error,total_error) - - ! - !Close FORTRAN predifined datatypes - ! - CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) - CALL h5close_f(error) - CALL check("h5close_types_f",error,total_error) - - ! if errors detected, exit with non-zero code. - IF (total_error .ne. 0) CALL h5_exit_f (1) - - END PROGRAM FFLUSH2EXAMPLE +PROGRAM FFLUSH2EXAMPLE + + USE HDF5 ! This module contains all necessary modules + USE TH5_MISC + + IMPLICIT NONE + + CHARACTER(LEN=7), PARAMETER :: filename = "fflush1" + CHARACTER(LEN=80) :: fix_filename + + ! + !data space rank and dimensions + ! + INTEGER, PARAMETER :: NX = 4 + INTEGER, PARAMETER :: NY = 5 + + ! + ! File identifiers + ! + INTEGER(HID_T) :: file_id + + ! + ! Group identifier + ! + INTEGER(HID_T) :: gid + + ! + ! dataset identifier + ! + INTEGER(HID_T) :: dset_id + + + ! + ! data type identifier + ! + INTEGER(HID_T) :: dtype_id + + ! + !flag to check operation success + ! + INTEGER :: error + + ! + !general purpose integer + ! + INTEGER :: i, j, total_error = 0 + + ! + !data buffers + ! + INTEGER, DIMENSION(NX,NY) :: data_out + INTEGER(HSIZE_T), DIMENSION(2) :: data_dims + data_dims(1) = NX + data_dims(2) = NY + + ! + !Initialize FORTRAN predifined datatypes + ! + CALL h5open_f(error) + CALL check("h5open_f",error,total_error) + + ! + !Open the file. + ! + CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error) + IF (error .NE. 0) THEN + WRITE(*,*) "Cannot modify filename" + CALL h5_exit_f (1) + ENDIF + CALL h5fopen_f(fix_filename, H5F_ACC_RDONLY_F, file_id, error) + CALL check("h5fopen_f",error,total_error) + + ! + !Open the dataset + ! + CALL h5dopen_f(file_id, "/D", dset_id, error) + CALL check("h5dopen_f",error,total_error) + + ! + !Get dataset's data type. + ! + CALL h5dget_type_f(dset_id, dtype_id, error) + CALL check("h5dget_type_f",error,total_error) + ! + !Read the dataset. + ! + CALL h5dread_f(dset_id, dtype_id, data_out, data_dims, error) + CALL check("h5dread_f",error,total_error) + + ! + !Print the dataset. + ! + DO i = 1, NX + WRITE(*,*) (data_out(i,j), j = 1, NY) + END DO + ! + !result of the print statement + ! + ! 0, 1, 2, 3, 4 + ! 1, 2, 3, 4, 5 + ! 2, 3, 4, 5, 6 + ! 3, 4, 5, 6, 7 + + ! + !Open the group. + ! + CALL h5gopen_f(file_id, "G", gid, error) + CALL check("h5gopen_f",error,total_error) + + ! + !In case error happens, exit. + ! + IF (error == -1) CALL h5_exit_f (1) + ! + !Close the datatype + ! + CALL h5tclose_f(dtype_id, error) + CALL check("h5tclose_f",error,total_error) + + ! + !Close the dataset. + ! + CALL h5dclose_f(dset_id, error) + CALL check("h5dclose_f",error,total_error) + + ! + !Close the group. + ! + CALL h5gclose_f(gid, error) + CALL check("h5gclose_f",error,total_error) + + ! + !Close the file. + ! + CALL h5fclose_f(file_id, error) + CALL check("h5fclose_f",error,total_error) + + ! + !Close FORTRAN predifined datatypes + ! + CALL h5_cleanup_f(filename, H5P_DEFAULT_F, error) + CALL h5close_f(error) + CALL check("h5close_types_f",error,total_error) + + ! if errors detected, exit with non-zero code. + IF (total_error .ne. 0) CALL h5_exit_f (1) + +END PROGRAM FFLUSH2EXAMPLE diff --git a/fortran/test/tH5T_F03.F90 b/fortran/test/tH5T_F03.F90 index 8117578..076769b 100644 --- a/fortran/test/tH5T_F03.F90 +++ b/fortran/test/tH5T_F03.F90 @@ -41,6 +41,7 @@ !** !*************************************************************** ! +#include MODULE TH5T_F03 @@ -969,8 +970,6 @@ END SUBROUTINE test_array_compound_atomic END SUBROUTINE test_array_bkg - - SUBROUTINE test_h5kind_to_type(total_error) IMPLICIT NONE @@ -986,22 +985,24 @@ END SUBROUTINE test_array_compound_atomic INTEGER, PARAMETER :: int_kind_4 = SELECTED_INT_KIND(4) !should map to INTEGER*2 on most modern processors INTEGER, PARAMETER :: int_kind_8 = SELECTED_INT_KIND(9) !should map to INTEGER*4 on most modern processors INTEGER, PARAMETER :: int_kind_16 = SELECTED_INT_KIND(18) !should map to INTEGER*8 on most modern processors -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 INTEGER, PARAMETER :: int_kind_32 = SELECTED_INT_KIND(36) !should map to INTEGER*16 on most modern processors INTEGER(int_kind_32), DIMENSION(1:4), TARGET :: dset_data_i32, data_out_i32 INTEGER(HID_T) :: dset_id32 ! Dataset identifier CHARACTER(LEN=6), PARAMETER :: dsetname16 = "dset16" ! Dataset name -!#endif - INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(Fortran_REAL_C_FLOAT) !should map to REAL*4 on most modern processors - INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(Fortran_REAL_C_DOUBLE) !should map to REAL*8 on most modern processors +#endif + INTEGER, PARAMETER :: real_kind_7 = SELECTED_REAL_KIND(C_FLOAT) !should map to REAL*4 on most modern processors + INTEGER, PARAMETER :: real_kind_15 = SELECTED_REAL_KIND(C_DOUBLE) !should map to REAL*8 on most modern processors -!#ifdef +#if H5_HAVE_FLOAT128!=0 INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(31) +#else + INTEGER, PARAMETER :: real_kind_31 = SELECTED_REAL_KIND(C_LONG_DOUBLE) +#endif REAL(real_kind_31), DIMENSION(1:4), TARGET :: dset_data_r31, data_out_r31 INTEGER(HID_T) :: dset_idr16 ! Dataset identifier CHARACTER(LEN=7), PARAMETER :: dsetnamer16 = "dsetr16" ! Dataset name - -!#endif + CHARACTER(LEN=12), PARAMETER :: filename = "dsetf_F03.h5" ! File name CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name @@ -1043,19 +1044,17 @@ END SUBROUTINE test_array_compound_atomic ! Initialize the dset_data array. ! DO i = 1, 4 - dset_data_i1(i) = 2**(4)-i - dset_data_i4(i) = 2**(10)-i - dset_data_i8(i) = 2**(28)-i - dset_data_i16(i) = 2**(28)-i -!#ifdef - dset_data_i32(i) = 2**(28)-i -!#endif - dset_data_r(i) = (i)*100. - dset_data_r7(i) = (i)*100. - dset_data_r15(i) = (i)*1000. -!#ifdef - dset_data_r31(i) = 3.141592653589793238462643383279_real_kind_31 -!#endif + dset_data_i1(i) = HUGE(0_int_kind_1)-i + dset_data_i4(i) = HUGE(0_int_kind_4)-i + dset_data_i8(i) = HUGE(0_int_kind_8)-i + dset_data_i16(i) = HUGE(0_int_kind_16)-i +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + dset_data_i32(i) = HUGE(0_int_kind_32)-i +#endif + dset_data_r(i) = 4.0*ATAN(1.0)-REAL(i-1) + dset_data_r7(i) = 4.0_real_kind_7*ATAN(1.0_real_kind_7)-REAL(i-1,real_kind_7) + dset_data_r15(i) = 4.0_real_kind_15*ATAN(1.0_real_kind_15)-REAL(i-1,real_kind_15) + dset_data_r31(i) = 4.0_real_kind_31*ATAN(1.0_real_kind_31)-REAL(i-1,real_kind_31) END DO @@ -1077,17 +1076,17 @@ END SUBROUTINE test_array_compound_atomic CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetname8, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), dspace_id, dset_id16, error) CALL check("H5Dcreate_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 CALL H5Dcreate_f(file_id, dsetname16, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), dspace_id, dset_id32, error) CALL check("H5Dcreate_f",error, total_error) -!#endif +#endif CALL H5Dcreate_f(file_id, dsetnamer, H5T_NATIVE_REAL, dspace_id, dset_idr, error) CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetnamer4, h5kind_to_type(real_kind_7,H5_REAL_KIND), dspace_id, dset_idr4, error) CALL check("H5Dcreate_f",error, total_error) CALL H5Dcreate_f(file_id, dsetnamer8, h5kind_to_type(real_kind_15,H5_REAL_KIND), dspace_id, dset_idr8, error) CALL check("H5Dcreate_f",error, total_error) -!#ifdef +!#ifdef H5_HAVE_FLOAT128 CALL H5Dcreate_f(file_id, dsetnamer16, h5kind_to_type(real_kind_31,H5_REAL_KIND), dspace_id, dset_idr16, error) CALL check("H5Dcreate_f",error, total_error) !#endif @@ -1106,11 +1105,11 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(dset_data_i16(1)) CALL h5dwrite_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 f_ptr = C_LOC(dset_data_i32(1)) CALL h5dwrite_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#endif +#endif f_ptr = C_LOC(dset_data_r(1)) CALL h5dwrite_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) CALL check("H5Dwrite_f",error, total_error) @@ -1120,7 +1119,7 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(dset_data_r15(1)) CALL h5dwrite_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) -!#ifdef +!#ifdef H5_HAVE_FLOAT128 f_ptr = C_LOC(dset_data_r31(1)) CALL h5dwrite_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) CALL check("H5Dwrite_f",error, total_error) @@ -1152,11 +1151,11 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(data_out_i16) CALL h5dread_f(dset_id16, h5kind_to_type(int_kind_16,H5_INTEGER_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#ifdef +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 f_ptr = C_LOC(data_out_i32) CALL h5dread_f(dset_id32, h5kind_to_type(int_kind_32,H5_INTEGER_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#endif +#endif f_ptr = C_LOC(data_out_r) CALL h5dread_f(dset_idr, H5T_NATIVE_REAL, f_ptr, error) CALL check("h5dread_f",error, total_error) @@ -1166,26 +1165,23 @@ END SUBROUTINE test_array_compound_atomic f_ptr = C_LOC(data_out_r15) CALL h5dread_f(dset_idr8, h5kind_to_type(real_kind_15,H5_REAL_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#ifdef f_ptr = C_LOC(data_out_r31) CALL h5dread_f(dset_idr16, h5kind_to_type(real_kind_31,H5_REAL_KIND), f_ptr, error) CALL check("h5dread_f",error, total_error) -!#endif DO i = 1, 4 - CALL verify("h5kind_to_type1",dset_data_i1(i),data_out_i1(i),total_error) - CALL verify("h5kind_to_type2",dset_data_i4(i),data_out_i4(i),total_error) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type3",INT(dset_data_i8(i),int_kind_8),INT(data_out_i8(i),int_kind_8),total_error) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) + CALL verify("h5kind_to_type",dset_data_i1(i),data_out_i1(i),total_error) + CALL verify("h5kind_to_type",dset_data_i4(i),data_out_i4(i),total_error) + CALL verify("h5kind_to_type",dset_data_i8(i),data_out_i8(i),total_error) + CALL verify("h5kind_to_type",dset_data_i16(i),data_out_i16(i),total_error) -!#ifdef -! PRINT*,dset_data_i16(i),data_out_i16(i) -!!$ CALL verify_Fortran_INTEGER_4("h5kind_to_type4",INT(dset_data_i16(i),int_kind_8),INT(data_out_i16(i),int_kind_8),total_error) -!#endif - CALL verify("h5kind_to_type5",dset_data_r(i),data_out_r(i),total_error) - CALL verify("h5kind_to_type6",dset_data_r7(i),data_out_r7(i),total_error) - CALL verify("h5kind_to_type7",dset_data_r15(i),data_out_r15(i),total_error) - +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + CALL verify("h5kind_to_type",dset_data_i32(i),data_out_i32(i),total_error) +#endif + CALL verify("h5kind_to_type",dset_data_r(i),data_out_r(i),total_error) + CALL verify("h5kind_to_type",dset_data_r7(i),data_out_r7(i),total_error) + CALL verify("h5kind_to_type",dset_data_r15(i),data_out_r15(i),total_error) + CALL verify("h5kind_to_type",dset_data_r31(i),data_out_r31(i),total_error) END DO ! diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 20eb895..000d2f0 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/Makefile.in b/hl/Makefile.in index e3c6e4c..b9291d0 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 1149d55..8593085 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index f41c41d..6633339 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index ca68491..1377756 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -468,6 +468,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 4a7c181..cae4d25 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -465,6 +465,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index eebefb1..b21c80d 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index b99b8fe..192b062 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -469,6 +469,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 38b0581..f974fad 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -412,6 +412,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 53bcac1..eb8865e 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,6 +489,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index 82e1f0d..1a06949 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -477,6 +477,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 90a7ce9..0f6187d 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -467,6 +467,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 776cc84..dc63ead 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -504,6 +504,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index e899e77..d133ddb 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index fc4f5f0..7213967 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/m4/aclocal_fc.m4 b/m4/aclocal_fc.m4 index 5107cc1..ea773b8 100644 --- a/m4/aclocal_fc.m4 +++ b/m4/aclocal_fc.m4 @@ -129,7 +129,7 @@ dnl Check to see C_LONG_DOUBLE is available, and if it dnl is different from C_DOUBLE AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ - HAVE_C_LONG_DOUBLE_FORTRAN="no" + FORTRAN_HAVE_C_LONG_DOUBLE="no" AC_MSG_CHECKING([if Fortran C_LONG_DOUBLE is valid]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([ @@ -156,7 +156,7 @@ AC_DEFUN([PAC_PROG_FC_HAVE_C_LONG_DOUBLE],[ CALL h5t(d) END PROGRAM main ])], [AC_MSG_RESULT([yes]) - HAVE_C_LONG_DOUBLE_FORTRAN="yes"], + FORTRAN_HAVE_C_LONG_DOUBLE="yes"], [AC_MSG_RESULT([no])]) ]) @@ -482,7 +482,6 @@ rm -f pac_fconftest.out ],[ pack_int_sizeof="$2" ]) -dnl PAC_FC_ALL_INTEGER_KINDS_SIZEOF="{ $pack_int_sizeof }" AC_MSG_RESULT([$pack_int_sizeof]) AC_LANG_POP([Fortran]) ]) diff --git a/src/H5config.h.in b/src/H5config.h.in index 61ca128..d2166f0 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -130,6 +130,9 @@ /* Define if the compiler understands the __FUNCTION__ keyword */ #undef HAVE_FUNCTION +/* Determine if INTEGER*16 is available */ +#undef HAVE_Fortran_INTEGER_SIZEOF_16 + /* Define to 1 if you have the `GetConsoleScreenBufferInfo' function. */ #undef HAVE_GETCONSOLESCREENBUFFERINFO diff --git a/src/Makefile.in b/src/Makefile.in index aaff35b..80cfc82 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -528,6 +528,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/test/Makefile.in b/test/Makefile.in index 2cd3f90..579252a 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -872,6 +872,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 91d1ec0..8229729 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -495,6 +495,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 2c355f0..e101d75 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index ddb3e17..a6dd483 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 8eb19cc..ff49111 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -481,6 +481,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index f615ca0..b7539fb 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -480,6 +480,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index d93c9b6..7dc4adf 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -474,6 +474,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 06c0f16..3e1946c 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -486,6 +486,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 8735c09..9b7c8ba 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -466,6 +466,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index f1f1add..78ff9ff 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -498,6 +498,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 7a0efb1..5efd8b8 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -476,6 +476,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 1c23ced..4d33c14 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -463,6 +463,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index ce2ce0c..498dca6 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -501,6 +501,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 40c9d63..28aae68 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -505,6 +505,7 @@ H5_LDFLAGS = @H5_LDFLAGS@ H5_VERSION = @H5_VERSION@ HADDR_T = @HADDR_T@ HAVE_DMALLOC = @HAVE_DMALLOC@ +HAVE_Fortran_INTEGER_SIZEOF_16 = @HAVE_Fortran_INTEGER_SIZEOF_16@ HAVE_PTHREAD = @HAVE_PTHREAD@ HDF5_HL = @HDF5_HL@ HDF5_INTERFACES = @HDF5_INTERFACES@ -- cgit v0.12