diff options
-rw-r--r-- | CMakeLists.txt | 35 | ||||
-rw-r--r-- | MANIFEST | 60 | ||||
-rw-r--r-- | Makefile.in | 1 | ||||
-rw-r--r-- | c++/Makefile.in | 1 | ||||
-rw-r--r-- | c++/examples/Makefile.in | 1 | ||||
-rw-r--r-- | c++/src/Makefile.in | 1 | ||||
-rw-r--r-- | c++/test/Makefile.in | 1 | ||||
-rw-r--r-- | config/cmake/ConfigureChecks.cmake | 2 | ||||
-rw-r--r-- | config/cmake/cacheinit.cmake | 2 | ||||
-rw-r--r-- | config/cmake/hdf5-config.cmake.in | 18 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFMacros.cmake | 22 | ||||
-rw-r--r-- | config/cmake_ext_mod/HDFUseFortran.cmake | 5 | ||||
-rw-r--r-- | config/pgi-fflags | 1 | ||||
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | examples/Makefile.in | 1 | ||||
-rw-r--r-- | fortran/Makefile.in | 1 | ||||
-rw-r--r-- | fortran/examples/Makefile.in | 1 | ||||
-rw-r--r-- | fortran/src/CMakeLists.txt | 11 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.cmake | 3 | ||||
-rw-r--r-- | fortran/src/H5config_f.inc.in | 3 | ||||
-rw-r--r-- | fortran/src/Makefile.in | 1 | ||||
-rw-r--r-- | fortran/test/CMakeLists.txt | 44 | ||||
-rw-r--r-- | fortran/test/Makefile.am | 16 | ||||
-rw-r--r-- | fortran/test/Makefile.in | 30 | ||||
-rw-r--r-- | fortran/test/fflush1.F90 (renamed from fortran/test/fflush1.f90) | 0 | ||||
-rw-r--r-- | fortran/test/fflush2.F90 (renamed from fortran/test/fflush2.f90) | 0 | ||||
-rw-r--r-- | fortran/test/fortranlib_test.F90 (renamed from fortran/test/fortranlib_test.f90) | 7 | ||||
-rw-r--r-- | fortran/test/fortranlib_test_1_8.F90 (renamed from fortran/test/fortranlib_test_1_8.f90) | 0 | ||||
-rw-r--r-- | fortran/test/fortranlib_test_F03.F90 (renamed from fortran/test/fortranlib_test_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5A.F90 (renamed from fortran/test/tH5A.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5A_1_8.F90 (renamed from fortran/test/tH5A_1_8.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5D.F90 (renamed from fortran/test/tH5D.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5E.F90 (renamed from fortran/test/tH5E.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5E_F03.F90 (renamed from fortran/test/tH5E_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5F.F90 (renamed from fortran/test/tH5F.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5F_F03.F90 (renamed from fortran/test/tH5F_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5G.F90 (renamed from fortran/test/tH5G.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5G_1_8.F90 (renamed from fortran/test/tH5G_1_8.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5I.F90 (renamed from fortran/test/tH5I.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5L_F03.F90 (renamed from fortran/test/tH5L_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5MISC_1_8.F90 (renamed from fortran/test/tH5MISC_1_8.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5O.F90 (renamed from fortran/test/tH5O.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5O_F03.F90 (renamed from fortran/test/tH5O_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5P.F90 (renamed from fortran/test/tH5P.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5P_F03.F90 (renamed from fortran/test/tH5P_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5R.F90 (renamed from fortran/test/tH5R.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5S.F90 (renamed from fortran/test/tH5S.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5Sselect.F90 (renamed from fortran/test/tH5Sselect.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5T.F90 (renamed from fortran/test/tH5T.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5VL.F90 (renamed from fortran/test/tH5VL.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tH5Z.F90 (renamed from fortran/test/tH5Z.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tHDF5.F90 (renamed from fortran/test/tHDF5.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tHDF5_1_8.F90 (renamed from fortran/test/tHDF5_1_8.f90) | 0 | ||||
-rw-r--r-- | fortran/test/tHDF5_F03.F90 (renamed from fortran/test/tHDF5_F03.f90) | 0 | ||||
-rw-r--r-- | fortran/testpar/Makefile.in | 1 | ||||
-rw-r--r-- | hl/Makefile.in | 1 | ||||
-rw-r--r-- | hl/c++/Makefile.in | 1 | ||||
-rw-r--r-- | hl/c++/examples/Makefile.in | 1 | ||||
-rw-r--r-- | hl/c++/src/Makefile.in | 1 | ||||
-rw-r--r-- | hl/c++/test/Makefile.in | 1 | ||||
-rw-r--r-- | hl/examples/Makefile.in | 1 | ||||
-rw-r--r-- | hl/fortran/Makefile.in | 1 | ||||
-rw-r--r-- | hl/fortran/examples/Makefile.in | 1 | ||||
-rw-r--r-- | hl/fortran/src/CMakeLists.txt | 15 | ||||
-rw-r--r-- | hl/fortran/src/H5HL_buildiface.F90 | 179 | ||||
-rw-r--r-- | hl/fortran/src/H5LTff.F90 | 34 | ||||
-rw-r--r-- | hl/fortran/src/Makefile.in | 1 | ||||
-rw-r--r-- | hl/fortran/test/Makefile.in | 1 | ||||
-rw-r--r-- | hl/fortran/test/tstlite.F90 | 1273 | ||||
-rw-r--r-- | hl/src/Makefile.in | 1 | ||||
-rw-r--r-- | hl/test/Makefile.in | 1 | ||||
-rw-r--r-- | hl/tools/Makefile.in | 1 | ||||
-rw-r--r-- | hl/tools/gif2h5/Makefile.in | 1 | ||||
-rw-r--r-- | hl/tools/h5watch/Makefile.in | 1 | ||||
-rw-r--r-- | src/H5config.h.in | 3 | ||||
-rw-r--r-- | src/Makefile.in | 1 | ||||
-rw-r--r-- | test/CMakeTests.cmake | 16 | ||||
-rw-r--r-- | test/Makefile.in | 1 | ||||
-rw-r--r-- | testpar/Makefile.in | 1 | ||||
-rw-r--r-- | tools/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5copy/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5diff/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5dump/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5format_convert/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5import/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5jam/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5ls/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5repack/Makefile.in | 1 | ||||
-rw-r--r-- | tools/h5stat/Makefile.in | 1 | ||||
-rw-r--r-- | tools/lib/Makefile.in | 1 | ||||
-rw-r--r-- | tools/misc/Makefile.in | 1 | ||||
-rw-r--r-- | tools/perform/Makefile.in | 1 |
93 files changed, 1140 insertions, 693 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c75114e..96d5772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -614,8 +614,23 @@ if (BUILD_TESTING) CACHE INTEGER "Timeout in seconds for each test (default 1200=20minutes)" ) + + option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) + mark_as_advanced (HDF5_TEST_VFD) + if (HDF5_TEST_VFD) + option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) + mark_as_advanced (HDF5_TEST_FHEAP_VFD) + endif (HDF5_TEST_VFD) + + option (HDF_TEST_EXPRESS "Control testing framework (0-3)" "0") + mark_as_advanced (HDF_TEST_EXPRESS) + enable_testing () include (CTest) + + include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) + configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) + if (NOT HDF5_EXTERNALLY_CONFIGURED) if (EXISTS "${HDF5_SOURCE_DIR}/test" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/test") add_subdirectory (${HDF5_SOURCE_DIR}/tools/lib ${PROJECT_BINARY_DIR}/tools/lib) @@ -627,16 +642,6 @@ if (BUILD_TESTING) endif (EXISTS "${HDF5_SOURCE_DIR}/testpar" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/testpar") endif (H5_HAVE_PARALLEL) endif (NOT HDF5_EXTERNALLY_CONFIGURED) - - option (HDF5_TEST_VFD "Execute tests with different VFDs" OFF) - mark_as_advanced (HDF5_TEST_VFD) - if (HDF5_TEST_VFD) - option (HDF5_TEST_FHEAP_VFD "Execute tests with different VFDs" ON) - mark_as_advanced (HDF5_TEST_FHEAP_VFD) - endif (HDF5_TEST_VFD) - - include (${HDF5_SOURCE_DIR}/CTestConfig.cmake) - configure_file (${HDF_RESOURCES_DIR}/CTestCustom.cmake ${HDF5_BINARY_DIR}/CTestCustom.ctest @ONLY) endif (BUILD_TESTING) #----------------------------------------------------------------------------- @@ -691,8 +696,18 @@ if (EXISTS "${HDF5_SOURCE_DIR}/fortran" AND IS_DIRECTORY "${HDF5_SOURCE_DIR}/for endif (NOT ALLOW_UNSUPPORTED) endif (BUILD_SHARED_LIBS AND APPLE) option (HDF5_ENABLE_F2003 "Enable FORTRAN 2003 Standard" ON) + include (${HDF_RESOURCES_EXT_DIR}/HDFUseFortran.cmake) + + message (STATUS "Fortran compiler ID is ${CMAKE_Fortran_COMPILER_ID}") + # Building with PGI requires CMake 3.3 or greater because previous versions + # of CMake add the wrong compiler flag for the PGI Fortran compiler. + if ("${CMAKE_Fortran_COMPILER_ID}" MATCHES "PGI" AND "${CMAKE_VERSION}" VERSION_LESS "3.3") + message (FATAL_ERROR " **** PGI FORTRAN REQUIRES CMAKE VERSION 3.3 OR GREATER **** ") + endif () + include (${HDF_RESOURCES_DIR}/HDF5UseFortran.cmake) + if (HDF5_ENABLE_F2003) if (NOT FORTRAN_HAVE_ISO_C_BINDING) set (HDF5_ENABLE_F2003 OFF) @@ -236,41 +236,41 @@ ./fortran/test/Makefile.am ./fortran/test/Makefile.in -./fortran/test/fflush1.f90 -./fortran/test/fflush2.f90 -./fortran/test/fortranlib_test.f90 -./fortran/test/fortranlib_test_1_8.f90 -./fortran/test/fortranlib_test_F03.f90 +./fortran/test/fflush1.F90 +./fortran/test/fflush2.F90 +./fortran/test/fortranlib_test.F90 +./fortran/test/fortranlib_test_1_8.F90 +./fortran/test/fortranlib_test_F03.F90 ./fortran/test/H5_test_buildiface.F90 ./fortran/test/t.c ./fortran/test/t.h ./fortran/test/tf.F90 -./fortran/test/tH5A.f90 -./fortran/test/tH5A_1_8.f90 -./fortran/test/tH5D.f90 -./fortran/test/tH5E_F03.f90 -./fortran/test/tH5E.f90 -./fortran/test/tH5F.f90 -./fortran/test/tH5F_F03.f90 -./fortran/test/tH5G.f90 -./fortran/test/tH5G_1_8.f90 -./fortran/test/tH5I.f90 -./fortran/test/tH5L_F03.f90 -./fortran/test/tH5MISC_1_8.f90 -./fortran/test/tH5O.f90 -./fortran/test/tH5O_F03.f90 -./fortran/test/tH5P_F03.f90 -./fortran/test/tH5P.f90 -./fortran/test/tH5R.f90 -./fortran/test/tH5S.f90 -./fortran/test/tH5Sselect.f90 +./fortran/test/tH5A.F90 +./fortran/test/tH5A_1_8.F90 +./fortran/test/tH5D.F90 +./fortran/test/tH5E_F03.F90 +./fortran/test/tH5E.F90 +./fortran/test/tH5F.F90 +./fortran/test/tH5F_F03.F90 +./fortran/test/tH5G.F90 +./fortran/test/tH5G_1_8.F90 +./fortran/test/tH5I.F90 +./fortran/test/tH5L_F03.F90 +./fortran/test/tH5MISC_1_8.F90 +./fortran/test/tH5O.F90 +./fortran/test/tH5O_F03.F90 +./fortran/test/tH5P_F03.F90 +./fortran/test/tH5P.F90 +./fortran/test/tH5R.F90 +./fortran/test/tH5S.F90 +./fortran/test/tH5Sselect.F90 ./fortran/test/tH5T_F03.F90 -./fortran/test/tH5T.f90 -./fortran/test/tH5VL.f90 -./fortran/test/tH5Z.f90 -./fortran/test/tHDF5_1_8.f90 -./fortran/test/tHDF5_F03.f90 -./fortran/test/tHDF5.f90 +./fortran/test/tH5T.F90 +./fortran/test/tH5VL.F90 +./fortran/test/tH5Z.F90 +./fortran/test/tHDF5_1_8.F90 +./fortran/test/tHDF5_F03.F90 +./fortran/test/tHDF5.F90 ./fortran/testpar/Makefile.am ./fortran/testpar/Makefile.in diff --git a/Makefile.in b/Makefile.in index 2e9effd..98fa5aa 100644 --- a/Makefile.in +++ b/Makefile.in @@ -298,6 +298,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/c++/Makefile.in b/c++/Makefile.in index 4ff4906..ff18fff 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -458,6 +458,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index 9691b5e..1d7dcbe 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -406,6 +406,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index f2e59b2..cd72f6a 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -469,6 +469,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index e487e54..380bd32 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -460,6 +460,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/config/cmake/ConfigureChecks.cmake b/config/cmake/ConfigureChecks.cmake index b9f18a9..8bd6f45 100644 --- a/config/cmake/ConfigureChecks.cmake +++ b/config/cmake/ConfigureChecks.cmake @@ -126,7 +126,7 @@ endif (NOT WINDOWS) # Check if Direct I/O driver works #----------------------------------------------------------------------------- if (NOT WINDOWS) - option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" ON) + option (HDF5_ENABLE_DIRECT_VFD "Build the Direct I/O Virtual File Driver" OFF) if (HDF5_ENABLE_DIRECT_VFD) set (msg "Performing TEST_DIRECT_VFD_WORKS") set (MACRO_CHECK_FUNCTION_DEFINITIONS "-DTEST_DIRECT_VFD_WORKS -D_GNU_SOURCE ${CMAKE_REQUIRED_FLAGS}") diff --git a/config/cmake/cacheinit.cmake b/config/cmake/cacheinit.cmake index 5b9d2b4..cef6b8f 100644 --- a/config/cmake/cacheinit.cmake +++ b/config/cmake/cacheinit.cmake @@ -48,6 +48,8 @@ set (HDF5_USE_18_API_DEFAULT OFF CACHE BOOL "Use the HDF5 1.8.x API by default" set (HDF5_ENABLE_THREADSAFE OFF CACHE BOOL "(WINDOWS)Enable Threadsafety" FORCE) +set (HDF_TEST_EXPRESS "2" CACHE STRING "Control testing framework (0-3)" FORCE) + set (HDF5_PACKAGE_EXTLIBS OFF CACHE BOOL "(WINDOWS)CPACK - include external libraries" FORCE) set (HDF5_NO_PACKAGES OFF CACHE BOOL "CPACK - Disable packaging" FORCE) diff --git a/config/cmake/hdf5-config.cmake.in b/config/cmake/hdf5-config.cmake.in index adeec55..3577e40 100644 --- a/config/cmake/hdf5-config.cmake.in +++ b/config/cmake/hdf5-config.cmake.in @@ -48,10 +48,6 @@ set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@" "${${HDF5_ set (${HDF5_PACKAGE_NAME}_SHARE_DIR "@PACKAGE_SHARE_INSTALL_DIR@") set_and_check (${HDF5_PACKAGE_NAME}_BUILD_DIR "@PACKAGE_CURRENT_BUILD_DIR@") -if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) - set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@") -endif () - if (${HDF5_PACKAGE_NAME}_BUILD_CPP_LIB) set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_CPP "@PACKAGE_INCLUDE_INSTALL_DIR@") endif () @@ -103,9 +99,17 @@ foreach (comp IN LISTS ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS) if (${comp} STREQUAL "shared") list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + + if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) + set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/shared") + endif () elseif (${comp} STREQUAL "static") list (REMOVE_ITEM ${HDF5_PACKAGE_NAME}_FIND_COMPONENTS ${comp}) set (${HDF5_PACKAGE_NAME}_LIB_TYPE ${${HDF5_PACKAGE_NAME}_LIB_TYPE} ${comp}) + + if (${HDF5_PACKAGE_NAME}_BUILD_FORTRAN) + set (${HDF5_PACKAGE_NAME}_INCLUDE_DIR_FORTRAN "@PACKAGE_INCLUDE_INSTALL_DIR@/static") + endif () endif () endforeach () foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) @@ -128,12 +132,12 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE) set (hdf5_comp2 "hdf5_hl_f90cstub") set (hdf5_comp "hdf5_hl_fortran") endif () - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) - if (${HAVE_COMP} LESS 0) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp}-${libtype}" HAVE_COMP) + if (${HAVE_COMP} LESS 0) set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () if (hdf5_comp2) - list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2) + list (FIND ${HDF5_PACKAGE_NAME}_EXPORT_LIBRARIES "${hdf5_comp2}-${libtype}" HAVE_COMP2) if (${HAVE_COMP2} LESS 0) set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 0) else () diff --git a/config/cmake_ext_mod/HDFMacros.cmake b/config/cmake_ext_mod/HDFMacros.cmake index d3ac36b..b2c4997 100644 --- a/config/cmake_ext_mod/HDFMacros.cmake +++ b/config/cmake_ext_mod/HDFMacros.cmake @@ -20,7 +20,7 @@ endmacro (IDE_GENERATED_PROPERTIES) macro (IDE_SOURCE_PROPERTIES SOURCE_PATH HEADERS SOURCES) # install (FILES ${HEADERS} # DESTINATION include/R3D/${NAME} - # COMPONENT Headers + # COMPONENT Headers # ) string (REPLACE "/" "\\\\" source_group_path ${SOURCE_PATH} ) @@ -90,7 +90,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) set (LIB_DEBUG_NAME "${libname}_debug") endif (WIN32) endif (${libtype} MATCHES "SHARED") - + set_target_properties (${libtarget} PROPERTIES OUTPUT_NAME_DEBUG ${LIB_DEBUG_NAME} @@ -98,7 +98,7 @@ macro (HDF_SET_LIB_OPTIONS libtarget libname libtype) OUTPUT_NAME_MINSIZEREL ${LIB_RELEASE_NAME} OUTPUT_NAME_RELWITHDEBINFO ${LIB_RELEASE_NAME} ) - + #----- Use MSVC Naming conventions for Shared Libraries if (MINGW AND ${libtype} MATCHES "SHARED") set_target_properties (${libtarget} @@ -176,7 +176,7 @@ macro (TARGET_C_PROPERTIES wintarget libtype addcompileflags addlinkflags) PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}" - ) + ) endif (MSVC) endmacro (TARGET_C_PROPERTIES) @@ -187,7 +187,7 @@ macro (TARGET_MSVC_PROPERTIES wintarget libtype addcompileflags addlinkflags) PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "${addlinkflags}" - ) + ) endif (MSVC) endmacro (TARGET_MSVC_PROPERTIES) @@ -206,13 +206,13 @@ macro (TARGET_FORTRAN_WIN_PROPERTIES forttarget libtype addcompileflags addlinkf PROPERTIES COMPILE_FLAGS "/dll ${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" - ) + ) else (${libtype} MATCHES "SHARED") set_target_properties (${forttarget} PROPERTIES COMPILE_FLAGS "${addcompileflags}" LINK_FLAGS "/SUBSYSTEM:CONSOLE ${addlinkflags}" - ) + ) endif (${libtype} MATCHES "SHARED") endif (MSVC) endmacro (TARGET_FORTRAN_WIN_PROPERTIES) @@ -235,6 +235,8 @@ macro (HDF_README_PROPERTIES target_fortran) set (BINARY_PLATFORM "${BINARY_PLATFORM} 7") elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.2") set (BINARY_PLATFORM "${BINARY_PLATFORM} 8") + elseif (${CMAKE_SYSTEM_VERSION} MATCHES "6.3") + set (BINARY_PLATFORM "${BINARY_PLATFORM} 10") endif (${CMAKE_SYSTEM_VERSION} MATCHES "6.1") set (BINARY_PLATFORM "${BINARY_PLATFORM} ${MSVC_C_ARCHITECTURE_ID}") if (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") @@ -245,6 +247,8 @@ macro (HDF_README_PROPERTIES target_fortran) set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2012") elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "18.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2013") + elseif (${CMAKE_C_COMPILER_VERSION} MATCHES "19.*") + set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO 2015") else (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") set (BINARY_PLATFORM "${BINARY_PLATFORM}, using VISUAL STUDIO ${CMAKE_C_COMPILER_VERSION}") endif (${CMAKE_C_COMPILER_VERSION} MATCHES "16.*") @@ -269,9 +273,9 @@ macro (HDF_README_PROPERTIES target_fortran) else (BUILD_SHARED_LIBS) set (LIB_TYPE "Static") endif (BUILD_SHARED_LIBS) - + configure_file ( - ${HDF_RESOURCES_DIR}/README.txt.cmake.in + ${HDF_RESOURCES_DIR}/README.txt.cmake.in ${CMAKE_BINARY_DIR}/README.txt @ONLY ) endmacro (HDF_README_PROPERTIES) diff --git a/config/cmake_ext_mod/HDFUseFortran.cmake b/config/cmake_ext_mod/HDFUseFortran.cmake index c1df8cf..275f2ea 100644 --- a/config/cmake_ext_mod/HDFUseFortran.cmake +++ b/config/cmake_ext_mod/HDFUseFortran.cmake @@ -3,7 +3,7 @@ # #------------------------------------------------------------------------------- ENABLE_LANGUAGE (Fortran) - + #----------------------------------------------------------------------------- # Detect name mangling convention used between Fortran and C #----------------------------------------------------------------------------- @@ -12,7 +12,6 @@ FortranCInterface_HEADER ( ${CMAKE_BINARY_DIR}/FCMangle.h MACRO_NAMESPACE "H5_FC_" SYMBOL_NAMESPACE "H5_FC_" - SYMBOLS mysub mymod:my_sub ) file (STRINGS ${CMAKE_BINARY_DIR}/FCMangle.h CONTENTS REGEX "H5_FC_GLOBAL\\(.*,.*\\) +(.*)") @@ -161,7 +160,7 @@ CHECK_FORTRAN_FEATURE(iso_c_binding IMPLICIT NONE TYPE(C_PTR) :: ptr TYPE(C_FUNPTR) :: funptr - INTEGER(C_INT64_T) :: c_int64_type + INTEGER(C_INT64_T) :: c_int64_type CHARACTER(LEN=80, KIND=c_char), TARGET :: ichr ptr = C_LOC(ichr(1:1)) END PROGRAM diff --git a/config/pgi-fflags b/config/pgi-fflags index 6cb8930..8e574e4 100644 --- a/config/pgi-fflags +++ b/config/pgi-fflags @@ -69,6 +69,7 @@ if test "X-pgf90" = "X-$f9x_vendor"; then # General FC_BASENAME=pgf90 + Fortran_COMPILER_ID=PGI F9XSUFFIXFLAG="" FSEARCH_DIRS="" # Uncomment the following to add something specific for FCFLAGS. @@ -774,6 +774,7 @@ ac_ct_CC LDFLAGS CFLAGS CC +Fortran_COMPILER_ID PAC_C_MAX_REAL_PRECISION UNAME_INFO enable_static @@ -3885,6 +3886,8 @@ $as_echo "done" >&6; } UNAME_INFO=`uname -a` +Fortran_COMPILER_ID=none + ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check ## that it actually does what it's supposed to do. Catch this early @@ -8261,6 +8264,11 @@ ac_compiler_gnu=$ac_cv_fc_compiler_gnu +cat >>confdefs.h <<_ACEOF +#define Fortran_COMPILER_ID $Fortran_COMPILER_ID +_ACEOF + + ## 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" diff --git a/configure.ac b/configure.ac index 820c2d0..42ba2a2 100644 --- a/configure.ac +++ b/configure.ac @@ -188,6 +188,8 @@ AC_SUBST([enable_shared]) AC_SUBST([enable_static]) AC_SUBST([UNAME_INFO]) UNAME_INFO=`uname -a` AC_SUBST([PAC_C_MAX_REAL_PRECISION]) +AC_SUBST([Fortran_COMPILER_ID]) +Fortran_COMPILER_ID=none ## ---------------------------------------------------------------------- ## Some platforms have broken basename, and/or xargs programs. Check @@ -516,7 +518,8 @@ if test "X$HDF_FORTRAN" = "Xyes"; then AC_SUBST([H5CONFIG_F_RKIND]) AC_SUBST([H5CONFIG_F_RKIND_SIZEOF]) AC_SUBST([H5CONFIG_F_NUM_IKIND]) - AC_SUBST([H5CONFIG_F_IKIND]) + AC_SUBST([H5CONFIG_F_IKIND]) + AC_DEFINE_UNQUOTED([Fortran_COMPILER_ID], $Fortran_COMPILER_ID, [Define Fortran compiler ID]) ## Setting definition if there is a 16 byte fortran integer if `echo $PAC_FC_ALL_INTEGER_KINDS_SIZEOF | grep '16' >/dev/null`; then diff --git a/examples/Makefile.in b/examples/Makefile.in index 94a0b54..e6d2945 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -406,6 +406,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 5d5d63e..ca2ea6d 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -462,6 +462,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 0ee1461..de02876 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -411,6 +411,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt index cf4be30..dc884d5 100644 --- a/fortran/src/CMakeLists.txt +++ b/fortran/src/CMakeLists.txt @@ -70,13 +70,12 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) else (WIN32) set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) endif (WIN32) -else (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) - else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) - endif (WIN32) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) +else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +endif (WIN32) INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY}) diff --git a/fortran/src/H5config_f.inc.cmake b/fortran/src/H5config_f.inc.cmake index cc36889..f0b3472 100644 --- a/fortran/src/H5config_f.inc.cmake +++ b/fortran/src/H5config_f.inc.cmake @@ -82,3 +82,6 @@ ! valid INTEGER KINDs (need to have a matching C counter-part) #define H5_H5CONFIG_F_IKIND @H5CONFIG_F_IKIND@ + +! Fortran compiler id +#define H5_Fortran_COMPILER_ID @Fortran_COMPILER_ID@ diff --git a/fortran/src/H5config_f.inc.in b/fortran/src/H5config_f.inc.in index 64c3a0c..9f094d2 100644 --- a/fortran/src/H5config_f.inc.in +++ b/fortran/src/H5config_f.inc.in @@ -57,3 +57,6 @@ ! valid INTEGER KINDs (need to have a matching C counter-part) #undef H5CONFIG_F_IKIND +! Fortran compiler name +#undef Fortran_COMPILER_ID + diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 582e90e..e5527aa 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -506,6 +506,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt index 16da168..97830ad 100644 --- a/fortran/test/CMakeLists.txt +++ b/fortran/test/CMakeLists.txt @@ -75,10 +75,27 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) ) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) -set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90 PROPERTIES LANGUAGE Fortran) -add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) +set (HDF5_F90_TF_SRCS + # generated files + ${HDF5_F90_BINARY_DIR}/tf_gen.F90 +) +set_source_files_properties ( + ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + PROPERTIES GENERATED TRUE +) +set_source_files_properties (tf.F90 ${HDF5_F90_BINARY_DIR}/${HDF5_F90_TF_SRCS} PROPERTIES LANGUAGE Fortran) + +set (CMD $<TARGET_FILE:H5_test_buildiface>) +add_custom_target (H5testgen ALL + COMMAND ${CMD} +#v3.2 BYPRODUCT ${HDF5_F90_BINARY_DIR}/tf_gen.F90 + WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR} + DEPENDS H5_test_buildiface +) + +add_library (${HDF5_F90_TEST_LIB_TARGET} STATIC tf.F90 ${HDF5_F90_TF_SRCS}) if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_BINARY_DIR}/tf_gen.F90) + add_library (${HDF5_F90_TEST_LIBSH_TARGET} SHARED tf.F90 ${HDF5_F90_TF_SRCS}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) set (CMD $<TARGET_FILE:H5_test_buildiface>) @@ -179,6 +196,8 @@ set_target_properties (testhdf5_fortran PROPERTIES FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +add_dependencies (testhdf5_fortran ${HDF5_F90_TEST_LIB_TARGET}) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_executable (testhdf5_fortran-shared fortranlib_test.F90 @@ -213,6 +232,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) + add_dependencies (testhdf5_fortran-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #-- Adding test for testhdf5_fortran_1_8 @@ -240,6 +260,8 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +add_dependencies (testhdf5_fortran_1_8 ${HDF5_F90_TEST_LIB_TARGET}) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_executable (testhdf5_fortran_1_8-shared fortranlib_test_1_8.F90 @@ -265,6 +287,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) + add_dependencies (testhdf5_fortran_1_8-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #-- Adding test for fortranlib_test_F03 @@ -294,6 +317,8 @@ set_target_properties (fortranlib_test_F03 PROPERTIES FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +add_dependencies (fortranlib_test_F03 ${HDF5_F90_TEST_LIB_TARGET}) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) add_executable (fortranlib_test_F03-shared fortranlib_test_F03.F90 @@ -320,7 +345,8 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) LINKER_LANGUAGE Fortran FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared -) + ) + add_dependencies (fortranlib_test_F03-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #-- Adding test for fflush1 @@ -341,8 +367,10 @@ set_target_properties (fflush1 PROPERTIES FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +add_dependencies (fflush1 ${HDF5_F90_TEST_LIB_TARGET}) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_executable (fflush1-shared fflush1.f90) + add_executable (fflush1-shared fflush1.F90) TARGET_NAMING (fflush1-shared SHARED) TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ") target_link_libraries (fflush1-shared @@ -359,6 +387,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) + add_dependencies (fflush1-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) #-- Adding test for fflush2 @@ -379,8 +408,10 @@ set_target_properties (fflush2 PROPERTIES FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static ) +add_dependencies (fflush2 ${HDF5_F90_TEST_LIB_TARGET}) + if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - add_executable (fflush2-shared fflush2.f90) + add_executable (fflush2-shared fflush2.F90) TARGET_NAMING (fflush2-shared SHARED) TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ") target_link_libraries (fflush2-shared @@ -397,6 +428,7 @@ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) FOLDER test/fortran Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared ) + add_dependencies (fflush2-shared ${HDF5_F90_TEST_LIBSH_TARGET}) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) include (CMakeTests.cmake) diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am index 530ee8c..60f9f53 100644 --- a/fortran/test/Makefile.am +++ b/fortran/test/Makefile.am @@ -43,18 +43,18 @@ check_PROGRAMS=$(TEST_PROG) libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c -fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ - tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 +fortranlib_test_SOURCES = tH5F.F90 tH5D.F90 tH5R.F90 tH5S.F90 tH5T.F90 tH5VL.F90 tH5Z.F90 \ + tH5Sselect.F90 tH5P.F90 tH5A.F90 tH5I.F90 tH5G.F90 tH5E.F90 tHDF5.F90 fortranlib_test.F90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ - fortranlib_test_1_8.f90 +fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90 tHDF5_1_8.F90 \ + fortranlib_test_1_8.F90 -fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 +fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5F_F03.F90 tH5L_F03.F90 \ + tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90 -fflush1_SOURCES=fflush1.f90 -fflush2_SOURCES=fflush2.f90 +fflush1_SOURCES=fflush1.F90 +fflush2_SOURCES=fflush2.F90 # The tests depend on both fortran libraries and both main libraries. LDADD=libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) $(LIBHDF5) diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index 8352da8..38aacf2 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -202,13 +202,6 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -FCCOMPILE = $(FC) $(AM_FCFLAGS) $(FCFLAGS) -LTFCCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=FC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(FC) $(AM_FCFLAGS) $(FCFLAGS) -AM_V_FC = $(am__v_FC_@AM_V@) -am__v_FC_ = $(am__v_FC_@AM_DEFAULT_V@) -am__v_FC_0 = @echo " FC " $@; -am__v_FC_1 = SOURCES = $(libh5test_fortran_la_SOURCES) \ $(H5_test_buildiface_SOURCES) $(fflush1_SOURCES) \ $(fflush2_SOURCES) $(fortranlib_test_SOURCES) \ @@ -517,6 +510,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ @@ -739,17 +733,17 @@ noinst_LTLIBRARIES = libh5test_fortran.la # Our main targets, the tests themselves TEST_PROG = fortranlib_test fflush1 fflush2 fortranlib_test_1_8 fortranlib_test_F03 libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c -fortranlib_test_SOURCES = tH5F.f90 tH5D.f90 tH5R.f90 tH5S.f90 tH5T.f90 tH5VL.f90 tH5Z.f90 \ - tH5Sselect.f90 tH5P.f90 tH5A.f90 tH5I.f90 tH5G.f90 tH5E.f90 tHDF5.f90 fortranlib_test.f90 +fortranlib_test_SOURCES = tH5F.F90 tH5D.F90 tH5R.F90 tH5S.F90 tH5T.F90 tH5VL.F90 tH5Z.F90 \ + tH5Sselect.F90 tH5P.F90 tH5A.F90 tH5I.F90 tH5G.F90 tH5E.F90 tHDF5.F90 fortranlib_test.F90 -fortranlib_test_1_8_SOURCES = tH5O.f90 tH5A_1_8.f90 tH5G_1_8.f90 tH5MISC_1_8.f90 tHDF5_1_8.f90 \ - fortranlib_test_1_8.f90 +fortranlib_test_1_8_SOURCES = tH5O.F90 tH5A_1_8.F90 tH5G_1_8.F90 tH5MISC_1_8.F90 tHDF5_1_8.F90 \ + fortranlib_test_1_8.F90 -fortranlib_test_F03_SOURCES = tH5E_F03.f90 tH5F_F03.f90 tH5L_F03.f90 \ - tH5O_F03.f90 tH5P_F03.f90 tH5T_F03.F90 tHDF5_F03.f90 fortranlib_test_F03.f90 +fortranlib_test_F03_SOURCES = tH5E_F03.F90 tH5F_F03.F90 tH5L_F03.F90 \ + tH5O_F03.F90 tH5P_F03.F90 tH5T_F03.F90 tHDF5_F03.F90 fortranlib_test_F03.F90 -fflush1_SOURCES = fflush1.f90 -fflush2_SOURCES = fflush2.f90 +fflush1_SOURCES = fflush1.F90 +fflush2_SOURCES = fflush2.F90 # The tests depend on both fortran libraries and both main libraries. LDADD = libh5test_fortran.la $(LIBH5TEST) $(LIBH5F) $(LIBHDF5) @@ -915,12 +909,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.f90.obj: - $(AM_V_FC)$(FCCOMPILE) -c -o $@ $(FCFLAGS_f90) `$(CYGPATH_W) '$<'` - -.f90.lo: - $(AM_V_FC)$(LTFCCOMPILE) -c -o $@ $(FCFLAGS_f90) $< - mostlyclean-libtool: -rm -f *.lo diff --git a/fortran/test/fflush1.f90 b/fortran/test/fflush1.F90 index ca2550f..ca2550f 100644 --- a/fortran/test/fflush1.f90 +++ b/fortran/test/fflush1.F90 diff --git a/fortran/test/fflush2.f90 b/fortran/test/fflush2.F90 index 4230832..4230832 100644 --- a/fortran/test/fflush2.f90 +++ b/fortran/test/fflush2.F90 diff --git a/fortran/test/fortranlib_test.f90 b/fortran/test/fortranlib_test.F90 index f41d811..2f88c45 100644 --- a/fortran/test/fortranlib_test.f90 +++ b/fortran/test/fortranlib_test.F90 @@ -24,6 +24,8 @@ ! !***** +!#include <H5config_f.inc> + PROGRAM fortranlibtest USE HDF5 @@ -93,9 +95,12 @@ PROGRAM fortranlibtest ret_total_error = 0 CALL extenddsettest(cleanup, ret_total_error) CALL write_test_status(ret_total_error, ' Extendible dataset test', total_error) -! MSB--DISABLED TEST-- Fails for unknown reasons on platypus with pgf90 compiler + +! -- DISABLE TEST FOR PGI COMPILER DUE TO COMPILER BUG -- 8/2015 -- HDFFV-9498 +!#if H5_Fortran_COMPILER_ID!=PGI ! CALL test_userblock_offset(cleanup, ret_total_error) ! CALL write_test_status(ret_total_error, ' Dataset offset with user block', total_error) +!#endif ! write(*,*) ! write(*,*) '=========================================' diff --git a/fortran/test/fortranlib_test_1_8.f90 b/fortran/test/fortranlib_test_1_8.F90 index 320d661..320d661 100644 --- a/fortran/test/fortranlib_test_1_8.f90 +++ b/fortran/test/fortranlib_test_1_8.F90 diff --git a/fortran/test/fortranlib_test_F03.f90 b/fortran/test/fortranlib_test_F03.F90 index 5b386b9..5b386b9 100644 --- a/fortran/test/fortranlib_test_F03.f90 +++ b/fortran/test/fortranlib_test_F03.F90 diff --git a/fortran/test/tH5A.f90 b/fortran/test/tH5A.F90 index 5b814fa..5b814fa 100644 --- a/fortran/test/tH5A.f90 +++ b/fortran/test/tH5A.F90 diff --git a/fortran/test/tH5A_1_8.f90 b/fortran/test/tH5A_1_8.F90 index c70e288..c70e288 100644 --- a/fortran/test/tH5A_1_8.f90 +++ b/fortran/test/tH5A_1_8.F90 diff --git a/fortran/test/tH5D.f90 b/fortran/test/tH5D.F90 index c9ba952..c9ba952 100644 --- a/fortran/test/tH5D.f90 +++ b/fortran/test/tH5D.F90 diff --git a/fortran/test/tH5E.f90 b/fortran/test/tH5E.F90 index 10ecaf6..10ecaf6 100644 --- a/fortran/test/tH5E.f90 +++ b/fortran/test/tH5E.F90 diff --git a/fortran/test/tH5E_F03.f90 b/fortran/test/tH5E_F03.F90 index 63e70a3..63e70a3 100644 --- a/fortran/test/tH5E_F03.f90 +++ b/fortran/test/tH5E_F03.F90 diff --git a/fortran/test/tH5F.f90 b/fortran/test/tH5F.F90 index 0b3c275..0b3c275 100644 --- a/fortran/test/tH5F.f90 +++ b/fortran/test/tH5F.F90 diff --git a/fortran/test/tH5F_F03.f90 b/fortran/test/tH5F_F03.F90 index 9e23d19..9e23d19 100644 --- a/fortran/test/tH5F_F03.f90 +++ b/fortran/test/tH5F_F03.F90 diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.F90 index 2ba174c..2ba174c 100644 --- a/fortran/test/tH5G.f90 +++ b/fortran/test/tH5G.F90 diff --git a/fortran/test/tH5G_1_8.f90 b/fortran/test/tH5G_1_8.F90 index ddc3736..ddc3736 100644 --- a/fortran/test/tH5G_1_8.f90 +++ b/fortran/test/tH5G_1_8.F90 diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.F90 index 97c48c6..97c48c6 100644 --- a/fortran/test/tH5I.f90 +++ b/fortran/test/tH5I.F90 diff --git a/fortran/test/tH5L_F03.f90 b/fortran/test/tH5L_F03.F90 index 40afdbc..40afdbc 100644 --- a/fortran/test/tH5L_F03.f90 +++ b/fortran/test/tH5L_F03.F90 diff --git a/fortran/test/tH5MISC_1_8.f90 b/fortran/test/tH5MISC_1_8.F90 index ba3f095..ba3f095 100644 --- a/fortran/test/tH5MISC_1_8.f90 +++ b/fortran/test/tH5MISC_1_8.F90 diff --git a/fortran/test/tH5O.f90 b/fortran/test/tH5O.F90 index 51e1d64..51e1d64 100644 --- a/fortran/test/tH5O.f90 +++ b/fortran/test/tH5O.F90 diff --git a/fortran/test/tH5O_F03.f90 b/fortran/test/tH5O_F03.F90 index 834308b..834308b 100644 --- a/fortran/test/tH5O_F03.f90 +++ b/fortran/test/tH5O_F03.F90 diff --git a/fortran/test/tH5P.f90 b/fortran/test/tH5P.F90 index 39d8c1e..39d8c1e 100644 --- a/fortran/test/tH5P.f90 +++ b/fortran/test/tH5P.F90 diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.F90 index ec9fef2..ec9fef2 100644 --- a/fortran/test/tH5P_F03.f90 +++ b/fortran/test/tH5P_F03.F90 diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.F90 index ef392b4..ef392b4 100644 --- a/fortran/test/tH5R.f90 +++ b/fortran/test/tH5R.F90 diff --git a/fortran/test/tH5S.f90 b/fortran/test/tH5S.F90 index 7223772..7223772 100644 --- a/fortran/test/tH5S.f90 +++ b/fortran/test/tH5S.F90 diff --git a/fortran/test/tH5Sselect.f90 b/fortran/test/tH5Sselect.F90 index aeb80e9..aeb80e9 100644 --- a/fortran/test/tH5Sselect.f90 +++ b/fortran/test/tH5Sselect.F90 diff --git a/fortran/test/tH5T.f90 b/fortran/test/tH5T.F90 index efbceea..efbceea 100644 --- a/fortran/test/tH5T.f90 +++ b/fortran/test/tH5T.F90 diff --git a/fortran/test/tH5VL.f90 b/fortran/test/tH5VL.F90 index 834fbde..834fbde 100644 --- a/fortran/test/tH5VL.f90 +++ b/fortran/test/tH5VL.F90 diff --git a/fortran/test/tH5Z.f90 b/fortran/test/tH5Z.F90 index 4201960..4201960 100644 --- a/fortran/test/tH5Z.f90 +++ b/fortran/test/tH5Z.F90 diff --git a/fortran/test/tHDF5.f90 b/fortran/test/tHDF5.F90 index d12bb25..d12bb25 100644 --- a/fortran/test/tHDF5.f90 +++ b/fortran/test/tHDF5.F90 diff --git a/fortran/test/tHDF5_1_8.f90 b/fortran/test/tHDF5_1_8.F90 index 9d1c3ec..9d1c3ec 100644 --- a/fortran/test/tHDF5_1_8.f90 +++ b/fortran/test/tHDF5_1_8.F90 diff --git a/fortran/test/tHDF5_F03.f90 b/fortran/test/tHDF5_F03.F90 index 3dbec11..3dbec11 100644 --- a/fortran/test/tHDF5_F03.f90 +++ b/fortran/test/tHDF5_F03.F90 diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index 9ee38d5..8f4b815 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -463,6 +463,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/Makefile.in b/hl/Makefile.in index f1e178d..b2309d8 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -462,6 +462,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index 7f71fc3..82177b4 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -458,6 +458,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index fc3237a..00c53d8 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -405,6 +405,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index 13602bb..9663130 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -461,6 +461,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index c22eff8..1fab9a5 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -458,6 +458,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 1061124..b9ede6f 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -405,6 +405,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index bd2ac82..304a3b6 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -462,6 +462,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index c992e8a..21ff588 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -410,6 +410,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/fortran/src/CMakeLists.txt b/hl/fortran/src/CMakeLists.txt index 064eb7c..ead21be 100644 --- a/hl/fortran/src/CMakeLists.txt +++ b/hl/fortran/src/CMakeLists.txt @@ -38,17 +38,16 @@ set_target_properties (H5HL_buildiface PROPERTIES if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/\${BUILD_TYPE}) else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) - endif (WIN32) -else (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) - if (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) - else (WIN32) - set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) + set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared) endif (WIN32) endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED) +if (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/\${BUILD_TYPE}) +else (WIN32) + set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static) +endif (WIN32) #----------------------------------------------------------------------------- # Setup include Directories diff --git a/hl/fortran/src/H5HL_buildiface.F90 b/hl/fortran/src/H5HL_buildiface.F90 index 0e85e27..9dd879c 100644 --- a/hl/fortran/src/H5HL_buildiface.F90 +++ b/hl/fortran/src/H5HL_buildiface.F90 @@ -83,13 +83,13 @@ PROGRAM H5HL_buildiface /) ! pointer to the buffer CHARACTER(LEN=37), DIMENSION(1:8), PARAMETER :: f_ptr_line=(/ & - ' f_ptr = C_LOC(buf) ', & - ' f_ptr = C_LOC(buf(1)) ', & - ' f_ptr = C_LOC(buf(1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1)) ', & - ' f_ptr = C_LOC(buf(1,1,1,1,1,1)) ', & + ' f_ptr = C_LOC(buf )', & + ' f_ptr = C_LOC(buf(1) )', & + ' f_ptr = C_LOC(buf(1,1) )', & + ' f_ptr = C_LOC(buf(1,1,1) )', & + ' f_ptr = C_LOC(buf(1,1,1,1) )', & + ' f_ptr = C_LOC(buf(1,1,1,1,1) )', & + ' f_ptr = C_LOC(buf(1,1,1,1,1,1) )', & ' f_ptr = C_LOC(buf(1,1,1,1,1,1,1))' & /) @@ -154,6 +154,13 @@ PROGRAM H5HL_buildiface WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_integer_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO WRITE(11,'(A)') " END INTERFACE" ! h5ltread_dataset_f @@ -165,6 +172,35 @@ PROGRAM H5HL_buildiface WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_real_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) ENDDO END DO + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_integer_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltread_dataset_int_f + WRITE(11,'(A)') " INTERFACE h5ltread_dataset_int_f" + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltread_dataset_int_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO + WRITE(11,'(A)') " END INTERFACE" + +! h5ltmake_dataset_int_f + WRITE(11,'(A)') " INTERFACE h5ltmake_dataset_int_f" + DO i = 1, num_ikinds + j = ikind(i) + WRITE(chr2,'(I2)') j + DO k = 1, 8 + WRITE(11,'(A)') " MODULE PROCEDURE h5ltmake_dataset_int_kind_"//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(k) + ENDDO + END DO WRITE(11,'(A)') " END INTERFACE" ! h5ltmake_dataset_float_f @@ -346,7 +382,6 @@ PROGRAM H5HL_buildiface k = rkind(i) WRITE(chr2,'(I2)') k DO j = 1, 8 - ! DLL definitions for windows WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_double_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) @@ -402,6 +437,134 @@ PROGRAM H5HL_buildiface ENDDO ENDDO +! h5ltmake_dataset_f + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,type_id,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id, namelen, dset_name, rank, dims, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltmake_dataset_int_f + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name,rank,dims,buf,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER, INTENT(IN) :: rank' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(hid_t) :: type_id' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' type_id = h5kind_to_type(KIND('//f_ptr_line(j)(19:36)//'), H5_INTEGER_KIND)' + WRITE(11,'(A)') ' errcode = h5ltmake_dataset_c(loc_id, namelen, dset_name, rank, dims, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltmake_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_f + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name, type_id, buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(hid_t), INTENT(in) :: type_id' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id, namelen, dset_name, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_integer_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + +! h5ltread_dataset_int_f + DO i = 1, num_ikinds + k = ikind(i) + WRITE(chr2,'(I2)') k + DO j = 1, 8 + +! DLL definitions for windows + WRITE(11,'(A)') '!DEC$if defined(BUILD_HDF5_HL_DLL)' + WRITE(11,'(A)') '!DEC$attributes dllexport :: h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + WRITE(11,'(A)') '!DEC$endif' + +! Subroutine API + WRITE(11,'(A)') ' SUBROUTINE h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))& + &//'_rank'//chr_rank(j)//'(loc_id,dset_name, buf,dims,errcode)' + WRITE(11,'(A)') ' IMPLICIT NONE' + WRITE(11,'(A)') ' INTEGER(hid_t) , INTENT(IN) :: loc_id' + WRITE(11,'(A)') ' CHARACTER(LEN=*), INTENT(IN) :: dset_name' + WRITE(11,'(A)') ' INTEGER(hsize_t), DIMENSION(*), INTENT(in) :: dims' + WRITE(11,'(A)') ' INTEGER(KIND='//TRIM(ADJUSTL(chr2))//'),INTENT(IN)'//TRIM(rank_dim_line(j))//', TARGET :: buf' + WRITE(11,'(A)') ' INTEGER :: errcode ' + WRITE(11,'(A)') ' TYPE(C_PTR) :: f_ptr' + WRITE(11,'(A)') ' INTEGER(size_t) :: namelen' + WRITE(11,'(A)') ' INTEGER(hid_t) :: type_id' + + WRITE(11,'(A)') f_ptr_line(j) + WRITE(11,'(A)') ' namelen = LEN(dset_name)' + WRITE(11,'(A)') ' type_id = h5kind_to_type(KIND('//f_ptr_line(j)(19:36)//'), H5_INTEGER_KIND)' + WRITE(11,'(A)') ' errcode = h5ltread_dataset_c(loc_id, namelen, dset_name, type_id, f_ptr)' + WRITE(11,'(A)') ' END SUBROUTINE h5ltread_dataset_int_kind_'//TRIM(ADJUSTL(chr2))//'_rank'//chr_rank(j) + ENDDO + ENDDO + WRITE(11,'(A)') 'END MODULE H5LT' ! change this to be generic MSB CLOSE(11) diff --git a/hl/fortran/src/H5LTff.F90 b/hl/fortran/src/H5LTff.F90 index ffc7ab5..d36d92c 100644 --- a/hl/fortran/src/H5LTff.F90 +++ b/hl/fortran/src/H5LTff.F90 @@ -38,47 +38,13 @@ MODULE H5LT_CONST USE hdf5 INTERFACE h5ltmake_dataset_f - MODULE PROCEDURE h5ltmake_dataset_f_int1 - MODULE PROCEDURE h5ltmake_dataset_f_int2 - MODULE PROCEDURE h5ltmake_dataset_f_int3 - MODULE PROCEDURE h5ltmake_dataset_f_int4 - MODULE PROCEDURE h5ltmake_dataset_f_int5 - MODULE PROCEDURE h5ltmake_dataset_f_int6 - MODULE PROCEDURE h5ltmake_dataset_f_int7 MODULE PROCEDURE h5ltmake_dataset_f_ptr END INTERFACE INTERFACE h5ltread_dataset_f - MODULE PROCEDURE h5ltread_dataset_f_int1 - MODULE PROCEDURE h5ltread_dataset_f_int2 - MODULE PROCEDURE h5ltread_dataset_f_int3 - MODULE PROCEDURE h5ltread_dataset_f_int4 - MODULE PROCEDURE h5ltread_dataset_f_int5 - MODULE PROCEDURE h5ltread_dataset_f_int6 - MODULE PROCEDURE h5ltread_dataset_f_int7 MODULE PROCEDURE h5ltread_dataset_f_ptr END INTERFACE - INTERFACE h5ltmake_dataset_int_f - MODULE PROCEDURE h5ltmake_dataset_int_f_1 - MODULE PROCEDURE h5ltmake_dataset_int_f_2 - MODULE PROCEDURE h5ltmake_dataset_int_f_3 - MODULE PROCEDURE h5ltmake_dataset_int_f_4 - MODULE PROCEDURE h5ltmake_dataset_int_f_5 - MODULE PROCEDURE h5ltmake_dataset_int_f_6 - MODULE PROCEDURE h5ltmake_dataset_int_f_7 - END INTERFACE - - INTERFACE h5ltread_dataset_int_f - MODULE PROCEDURE h5ltread_dataset_int_f_1 - MODULE PROCEDURE h5ltread_dataset_int_f_2 - MODULE PROCEDURE h5ltread_dataset_int_f_3 - MODULE PROCEDURE h5ltread_dataset_int_f_4 - MODULE PROCEDURE h5ltread_dataset_int_f_5 - MODULE PROCEDURE h5ltread_dataset_int_f_6 - MODULE PROCEDURE h5ltread_dataset_int_f_7 - END INTERFACE - INTERFACE INTEGER FUNCTION h5ltmake_dataset_c(loc_id,namelen,dset_name,rank,dims,type_id,buf) & BIND(C,NAME='h5ltmake_dataset_c') diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 5f10a92..9a893be 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -489,6 +489,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index da46790..117faf2 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -472,6 +472,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/fortran/test/tstlite.F90 b/hl/fortran/test/tstlite.F90 index 0eb005b..0ba7815 100644 --- a/hl/fortran/test/tstlite.F90 +++ b/hl/fortran/test/tstlite.F90 @@ -19,7 +19,7 @@ #include <H5config_f.inc> PROGRAM lite_test - + CALL test_dataset1D() CALL test_dataset2D() CALL test_dataset3D() @@ -38,149 +38,148 @@ END PROGRAM lite_test !------------------------------------------------------------------------- SUBROUTINE test_dataset1D() + + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + + IMPLICIT NONE + + INTEGER, PARAMETER :: DIM1 = 4 ! Dimension of array + CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions + INTEGER :: rank = 1 ! Dataset rank + INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer + INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer + REAL, DIMENSION(DIM1) :: buf2 ! Data buffer + REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER :: i ! general purpose integer + TYPE(C_PTR) :: f_ptr + integer(HID_T) :: mytype -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 4; ! Dimension of array -CHARACTER(len=9), PARAMETER :: filename = "dsetf1.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(1) :: dims = (/DIM1/) ! Dataset dimensions -INTEGER :: rank = 1 ! Dataset rank -INTEGER, DIMENSION(DIM1) :: buf1 ! Data buffer -INTEGER, DIMENSION(DIM1) :: bufr1 ! Data buffer -REAL, DIMENSION(DIM1) :: buf2 ! Data buffer -REAL, DIMENSION(DIM1) :: bufr2 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr3 ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER :: i ! general purpose integer -TYPE(C_PTR) :: f_ptr -integer(HID_T) :: mytype - -CALL test_begin(' Make/Read datasets (1D) ') - -! -! Initialize the data array. -! -DO i = 1, DIM1 - buf1(i) = i; - buf2(i) = i; - buf3(i) = i; -END DO + CALL test_begin(' Make/Read datasets (1D) ') -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) + ! + ! Initialize the data array. + ! + DO i = 1, DIM1 + buf1(i) = i + buf2(i) = i + buf3(i) = i + END DO -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) -!------------------------------------------------------------------------- -! H5T_NATIVE_INTEGER -!------------------------------------------------------------------------- + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) + !------------------------------------------------------------------------- + ! H5T_NATIVE_INTEGER + !------------------------------------------------------------------------- -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf1, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr1, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf1(i) .NE. bufr1(i) ) THEN - PRINT *, 'read buffer differs from write buffer (I)' - PRINT *, bufr1(i), ' and ', buf1(i) - STOP - ENDIF -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf1(i) .NE. bufr1(i) ) THEN + PRINT *, 'read buffer differs from write buffer (I)' + PRINT *, bufr1(i), ' and ', buf1(i) + STOP + ENDIF + END DO -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_REAL, buf2, errcode) -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_REAL, bufr2, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf2(i) .NE. bufr2(i) ) THEN - PRINT *, 'read buffer differs from write buffer (R)' - PRINT *, bufr2(i), ' and ', buf2(i) - STOP - ENDIF -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf2(i) .NE. bufr2(i) ) THEN + PRINT *, 'read buffer differs from write buffer (R)' + PRINT *, bufr2(i), ' and ', buf2(i) + STOP + ENDIF + END DO -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- -! -! write dataset. -! -f_ptr = C_LOC(buf3(1)) -mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & - mytype, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) -! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) -! -! read dataset. -! -f_ptr = C_LOC(bufr3(1)) -CALL h5ltread_dataset_f(file_id, dsetname3, & - h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) + ! + ! write dataset. + ! + f_ptr = C_LOC(buf3(1)) + mytype = h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, & + mytype, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_DOUBLE, buf3, errcode) + ! h5kind_to_type(KIND(buf3(1)), H5_REAL_KIND) + ! + ! read dataset. + ! + f_ptr = C_LOC(bufr3(1)) + CALL h5ltread_dataset_f(file_id, dsetname3, & + h5kind_to_type(KIND(bufr3(1)), H5_REAL_KIND), f_ptr, errcode) + !CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_DOUBLE, bufr3, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, DIM1 - IF ( buf3(i) .NE. bufr3(i) ) THEN - PRINT *, 'read buffer differs from write buffer (D)' - PRINT *, bufr3(i), ' and ', buf3(i) - STOP - ENDIF -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf3(i) .NE. bufr3(i) ) THEN + PRINT *, 'read buffer differs from write buffer (D)' + PRINT *, bufr3(i), ' and ', buf3(i) + STOP + ENDIF + END DO -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) -CALL passed() -! -! end function. -! + CALL passed() + ! + ! end function. + ! END SUBROUTINE test_dataset1D !------------------------------------------------------------------------- @@ -189,194 +188,193 @@ END SUBROUTINE test_dataset1D SUBROUTINE test_dataset2D() -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - - -INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4; ! columns -INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6; ! rows -CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions -INTEGER :: rank = 2 ! Dataset rank -INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, n ! general purpose integers -TYPE(C_PTR) :: f_ptr - -CALL test_begin(' Make/Read datasets (2D) ') + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + IMPLICIT NONE -! -! Initialize the data arrays. -! -n=1 -DO i = 1, DIM1*DIM2 - buf(i) = INT(n) - n = n + 1 -END DO -DO i = 1, dims(1) - DO j = 1, dims(2) - buf2(i,j) = INT((i-1)*dims(2) + j) - buf3(i,j) = INT((i-1)*dims(2) + j) - buf4(i,j) = INT((i-1)*dims(2) + j) - END DO -END DO + INTEGER(HSIZE_T), PARAMETER :: DIM1 = 4 ! columns + INTEGER(HSIZE_T), PARAMETER :: DIM2 = 6 ! rows + CHARACTER(len=9), PARAMETER :: filename = "dsetf2.h5"! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/4,6/) ! Dataset dimensions + INTEGER :: rank = 2 ! Dataset rank + INTEGER, DIMENSION(DIM1*DIM2) :: buf ! Data buffer + INTEGER, DIMENSION(DIM1*DIM2) :: bufr ! Data buffer + INTEGER, DIMENSION(DIM1,DIM2) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1,DIM2) :: buf2r ! Data buffer + REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1,DIM2), TARGET :: buf3r ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1,DIM2), TARGET :: buf4r ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, n ! general purpose integers + TYPE(C_PTR) :: f_ptr + CALL test_begin(' Make/Read datasets (2D) ') -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) + ! + ! Initialize the data arrays. + ! + n=1 + DO i = 1, DIM1*DIM2 + buf(i) = INT(n) + n = n + 1 + END DO -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- + DO i = 1, dims(1) + DO j = 1, dims(2) + buf2(i,j) = INT((i-1)*dims(2) + j) + buf3(i,j) = INT((i-1)*dims(2) + j) + buf4(i,j) = INT((i-1)*dims(2) + j) + END DO + END DO -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT 1D buffer + !------------------------------------------------------------------------- -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 2D buffer -!------------------------------------------------------------------------- + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1*DIM2 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF + END DO -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j), ' and ', buf2(i,j) - STOP - ENDIF - END DO -END DO + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT 2D buffer + !------------------------------------------------------------------------- -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf2(i,j) .NE. buf2r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j), ' and ', buf2(i,j) + STOP + ENDIF + END DO + END DO -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j), ' and ', buf3(i,j) - STOP - ENDIF - END DO -END DO + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- + ! + ! write dataset. + ! + f_ptr = C_LOC(buf3(1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) + ! + ! read dataset. + ! + f_ptr = C_LOC(buf3r(1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) -! -! read dataset. -f_ptr = C_LOC(buf4r(1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf3(i,j) .NE. buf3r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j), ' and ', buf3(i,j) + STOP + ENDIF + END DO + END DO -!CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j), ' and ', buf4(i,j) - STOP - ENDIF - END DO -END DO + ! + ! write dataset. + ! + f_ptr = C_LOC(buf4(1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, buf4, errcode) -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) + ! + ! read dataset. + f_ptr = C_LOC(buf4r(1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) + !CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, buf4r, dims, errcode) -CALL passed() -! -! end function. -! + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + IF ( buf4(i,j) .NE. buf4r(i,j) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j), ' and ', buf4(i,j) + STOP + ENDIF + END DO + END DO + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! END SUBROUTINE test_dataset2D @@ -386,215 +384,313 @@ END SUBROUTINE test_dataset2D SUBROUTINE test_dataset3D() -USE, INTRINSIC :: ISO_C_BINDING -USE H5LT ! module of H5LT -USE HDF5 ! module of HDF5 library - -IMPLICIT NONE - -INTEGER, PARAMETER :: DIM1 = 6 ! columns -INTEGER, PARAMETER :: DIM2 = 4 ! rows -INTEGER, PARAMETER :: DIM3 = 2 ! layers -CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name -CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name -CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name -INTEGER(HID_T) :: file_id ! File identifier -INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions -INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer -INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer -INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer -REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer -DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer -INTEGER :: rank = 3 ! Dataset rank -INTEGER :: errcode ! Error flag -INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers -INTEGER :: type_class -INTEGER(SIZE_T) :: type_size -TYPE(C_PTR) :: f_ptr -CALL test_begin(' Make/Read datasets (3D) ') + USE, INTRINSIC :: ISO_C_BINDING + USE H5LT ! module of H5LT + USE HDF5 ! module of HDF5 library + IMPLICIT NONE -! -! Initialize the data array. -! -n=1 -DO i = 1, DIM1*DIM2*DIM3 - buf(i) = INT(n) - n = n + 1 -END DO - -n = 1 -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - buf2(i,j,k) = INT(n) - buf3(i,j,k) = INT(n) - buf4(i,j,k) = INT(n) - n = n + 1 - END DO - END DO -END DO + INTEGER, PARAMETER :: DIM1 = 6 ! columns + INTEGER, PARAMETER :: DIM2 = 4 ! rows + INTEGER, PARAMETER :: DIM3 = 2 ! layers + CHARACTER(len=9), PARAMETER :: filename = "dsetf3.h5" ! File name + CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + INTEGER(HID_T) :: file_id ! File identifier + INTEGER(HSIZE_T), DIMENSION(3) :: dims = (/DIM1,DIM2,DIM3/) ! Dataset dimensions + INTEGER(HSIZE_T), DIMENSION(3) :: dimsr ! Dataset dimensions + INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: buf ! Data buffer + INTEGER, DIMENSION(DIM1*DIM2*DIM3) :: bufr ! Data buffer + INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2 ! Data buffer + INTEGER, DIMENSION(DIM1,DIM2,DIM3) :: buf2r ! Data buffer + REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf3r ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1,DIM2,DIM3), TARGET :: buf4r ! Data buffer + INTEGER :: rank = 3 ! Dataset rank + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, k, n ! general purpose integers + INTEGER :: type_class + INTEGER(SIZE_T) :: type_size + TYPE(C_PTR) :: f_ptr +#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(DIM1,DIM2,DIM3), TARGET :: dset_data_i32, data_out_i32 + INTEGER(HID_T) :: dset_id32 ! Dataset identifier + CHARACTER(LEN=7), PARAMETER :: dsetname16a = "dset16a" ! Dataset name + CHARACTER(LEN=7), PARAMETER :: dsetname16b = "dset16b" ! Dataset name + CHARACTER(LEN=7), PARAMETER :: dsetname16c = "dset16c" ! Dataset name + INTEGER(HID_T) :: type_id +#endif -! -! Initialize FORTRAN predefined datatypes. -! -CALL h5open_f(errcode) + CALL test_begin(' Make/Read datasets (3D) ') -! -! Create a new file using default properties. -! -CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 1D buffer -!------------------------------------------------------------------------- + ! + ! Initialize the data array. + ! + n=1 + DO i = 1, DIM1*DIM2*DIM3 + buf(i) = INT(n) + n = n + 1 + END DO -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) + n = 1 + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + buf2(i,j,k) = INT(n) + buf3(i,j,k) = INT(n) + buf4(i,j,k) = INT(n) +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + dset_data_i32(i,j,k) = HUGE(1_int_kind_32)-INT(n,int_kind_32) +#endif + n = n + 1 + END DO + END DO + END DO -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) + ! + ! Initialize FORTRAN predefined datatypes. + ! + CALL h5open_f(errcode) -! -! compare read and write buffers. -! -DO i = 1, DIM1*DIM2*DIM3 - IF ( buf(i) .NE. bufr(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr(i), ' and ', buf(i) - STOP - ENDIF -END DO + ! + ! Create a new file using default properties. + ! + CALL h5fcreate_f(filename, H5F_ACC_TRUNC_F, file_id, errcode) -!------------------------------------------------------------------------- -! H5T_NATIVE_INT 3D buffer -!------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT 1D buffer + !------------------------------------------------------------------------- -! -! write dataset. -! -CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname1, rank, dims, H5T_NATIVE_INTEGER, buf, errcode) -! -! read dataset. -! -CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname1, H5T_NATIVE_INTEGER, bufr, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) - STOP - ENDIF - END DO - END DO -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1*DIM2*DIM3 + IF ( buf(i) .NE. bufr(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr(i), ' and ', buf(i) + STOP + ENDIF + END DO -!------------------------------------------------------------------------- -! H5T_NATIVE_REAL -!------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! H5T_NATIVE_INT 3D buffer + !------------------------------------------------------------------------- -! -! write dataset. -! -f_ptr = C_LOC(buf3(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) + ! + ! write dataset. + ! + CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims, H5T_NATIVE_INTEGER, buf2, errcode) -! -! read dataset. -! -f_ptr = C_LOC(buf3r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) -!CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) + ! + ! read dataset. + ! + CALL h5ltread_dataset_f(file_id, dsetname2, H5T_NATIVE_INTEGER, buf2r, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) - STOP - ENDIF - END DO - END DO -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf2(i,j,k) .NE. buf2r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf2r(i,j,k), ' and ', buf2(i,j,k) + STOP + ENDIF + END DO + END DO + END DO -!------------------------------------------------------------------------- -! H5T_NATIVE_DOUBLE -!------------------------------------------------------------------------- + !------------------------------------------------------------------------- + ! H5T_NATIVE_REAL + !------------------------------------------------------------------------- -! -! write dataset. -! -f_ptr = C_LOC(buf4(1,1,1)) -CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ! + ! write dataset. + ! + f_ptr = C_LOC(buf3(1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims, H5T_NATIVE_REAL, buf3, errcode) -! -! read dataset. -! -f_ptr = C_LOC(buf4r(1,1,1)) -CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) + ! + ! read dataset. + ! + f_ptr = C_LOC(buf3r(1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, f_ptr, errcode) + !CALL h5ltread_dataset_f(file_id, dsetname3, H5T_NATIVE_REAL, buf3r, dims, errcode) -! -! compare read and write buffers. -! -DO i = 1, dims(1) - DO j = 1, dims(2) - DO k = 1, dims(3) - IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) - STOP - ENDIF - END DO - END DO -END DO + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf3(i,j,k) .NE. buf3r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf3r(i,j,k), ' and ', buf3(i,j,k) + STOP + ENDIF + END DO + END DO + END DO -CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + !------------------------------------------------------------------------- + ! H5T_NATIVE_DOUBLE + !------------------------------------------------------------------------- -! -! compare dimensions -! -DO i = 1, rank - IF ( dimsr(i) .NE. dims(i) ) THEN - PRINT *, 'dimensions differ ' - STOP - ENDIF -END DO + ! + ! write dataset. + ! + f_ptr = C_LOC(buf4(1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims, H5T_NATIVE_DOUBLE, f_ptr, errcode) -! -! Close the file. -! -CALL h5fclose_f(file_id, errcode) + ! + ! read dataset. + ! + f_ptr = C_LOC(buf4r(1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname4, H5T_NATIVE_DOUBLE, f_ptr, errcode) -! -! Close FORTRAN predefined datatypes. -! -CALL h5close_f(errcode) + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( buf4(i,j,k) .NE. buf4r(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, buf4r(i,j,k), ' and ', buf4(i,j,k) + STOP + ENDIF + END DO + END DO + END DO -CALL passed() -! -! end function. -! + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + + ! + ! compare dimensions + ! + DO i = 1, rank + IF ( dimsr(i) .NE. dims(i) ) THEN + PRINT *, 'dimensions differ ' + STOP + ENDIF + END DO + + !------------------------------------------------------------------------- + ! CHECKING NON-NATIVE INTEGER TYPES + !------------------------------------------------------------------------- + +#if H5_HAVE_Fortran_INTEGER_SIZEOF_16!=0 + ! (A) CHECKING INTEGER*16 + ! + ! (i.a) write dataset using F2003 interface + ! + type_id = H5kind_to_type(KIND(dset_data_i32(1,1,1)), H5_INTEGER_KIND) + f_ptr = C_LOC(dset_data_i32(1,1,1)) + CALL h5ltmake_dataset_f(file_id, dsetname16a, rank, dims, type_id, f_ptr, errcode) + ! + ! (i.b) read dataset using F2003 interface + ! + f_ptr = C_LOC(data_out_i32(1,1,1)) + CALL h5ltread_dataset_f(file_id, dsetname16a, type_id, f_ptr, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( dset_data_i32(i,j,k) .NE. data_out_i32(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dset_data_i32(i,j,k), ' and ', data_out_i32(i,j,k) + STOP + ENDIF + END DO + END DO + ENDDO + + ! + ! (ii.a) write dataset using F90 interface + ! + type_id = H5kind_to_type(KIND(dset_data_i32(1,1,1)), H5_INTEGER_KIND) + CALL h5ltmake_dataset_f(file_id, dsetname16b, rank, dims, type_id, dset_data_i32, errcode) + ! + ! (ii.b) read dataset using F90 interface + ! + CALL h5ltread_dataset_f(file_id, dsetname16b, type_id, data_out_i32, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( dset_data_i32(i,j,k) .NE. data_out_i32(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dset_data_i32(i,j,k), ' and ', data_out_i32(i,j,k) + STOP + ENDIF + END DO + END DO + ENDDO + + ! + ! (iii.a) write dataset using F90 H5LTmake_dataset_int_f interface + ! + CALL h5ltmake_dataset_int_f(file_id, dsetname16c, rank, dims, dset_data_i32, errcode) + + ! + ! (iii.b) read dataset using F90 H5LTmake_dataset_int_f interface + ! + CALL h5ltread_dataset_int_f(file_id, dsetname16c, data_out_i32, dims, errcode) + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + IF ( dset_data_i32(i,j,k) .NE. data_out_i32(i,j,k) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, dset_data_i32(i,j,k), ' and ', data_out_i32(i,j,k) + STOP + ENDIF + END DO + END DO + ENDDO + +#endif + + ! + ! Close the file. + ! + CALL h5fclose_f(file_id, errcode) + + ! + ! Close FORTRAN predefined datatypes. + ! + CALL h5close_f(errcode) + + CALL passed() + ! + ! end function. + ! END SUBROUTINE test_dataset3D !------------------------------------------------------------------------- @@ -623,6 +719,7 @@ SUBROUTINE test_datasetND(rank) CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname4 = "dset4" ! Dataset name + CHARACTER(LEN=5), PARAMETER :: dsetname5 = "dset5" ! Dataset name INTEGER(HID_T) :: file_id ! File identifier INTEGER(HSIZE_T), DIMENSION(7) :: dims INTEGER(HSIZE_T), DIMENSION(7) :: dimsr ! Dataset dimensions @@ -650,29 +747,41 @@ SUBROUTINE test_datasetND(rank) DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: dbufr_6 ! Data buffer DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbuf_7 ! Data buffer DOUBLE PRECISION, ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: dbufr_7 ! Data buffer - INTEGER :: errcode ! Error flag - INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: cbuf_4 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:), TARGET :: cbufr_4 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: cbuf_5 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:), TARGET :: cbufr_5 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: cbuf_6 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:,:), TARGET :: cbufr_6 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: cbuf_7 ! Data buffer + CHARACTER(LEN=5), ALLOCATABLE, DIMENSION(:,:,:,:,:,:,:), TARGET :: cbufr_7 ! Data buffer + INTEGER :: errcode ! Error flag + INTEGER(HSIZE_T) :: i, j, k, l, m, n, o, nn ! general purpose integers INTEGER :: type_class INTEGER(SIZE_T) :: type_size CHARACTER(LEN=1) :: ichr1 + CHARACTER(LEN=3) :: ichr3 TYPE(C_PTR) :: f_ptr + INTEGER(HID_T) :: type_id WRITE(ichr1,'(I1.1)') rank CALL test_begin(' Make/Read datasets ('//ichr1//'D) ') -! -! Initialize the data array. -! + ! + ! Initialize the data array. + ! IF(rank.EQ.4)THEN - + ALLOCATE(ibuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) ALLOCATE(ibufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) ALLOCATE(rbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) ALLOCATE(rbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) ALLOCATE(dbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) ALLOCATE(dbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(cbuf_4 (1:DIM1,1:DIM2,1:DIM3,1:DIM4)) + ALLOCATE(cbufr_4(1:DIM1,1:DIM2,1:DIM3,1:DIM4)) dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,0,0,0/) - + nn = 1 DO i = 1, DIM1 DO j = 1, DIM2 @@ -681,12 +790,14 @@ SUBROUTINE test_datasetND(rank) ibuf_4(i,j,k,l) = INT(nn) rbuf_4(i,j,k,l) = INT(nn) dbuf_4(i,j,k,l) = INT(nn) + WRITE(cbuf_4(i,j,k,l),'(I5.5)') nn nn = nn + 1 END DO END DO END DO + ENDDO - + ELSE IF(rank.EQ.5)THEN ALLOCATE(ibuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) @@ -695,9 +806,11 @@ SUBROUTINE test_datasetND(rank) ALLOCATE(rbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) ALLOCATE(dbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) ALLOCATE(dbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(cbuf_5 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) + ALLOCATE(cbufr_5(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5)) dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,0,0/) - + nn = 1 DO i = 1, DIM1 DO j = 1, DIM2 @@ -707,6 +820,7 @@ SUBROUTINE test_datasetND(rank) ibuf_5(i,j,k,l,m) = INT(nn) rbuf_5(i,j,k,l,m) = INT(nn) dbuf_5(i,j,k,l,m) = INT(nn) + WRITE(cbuf_5(i,j,k,l,m),'(I5.5)') nn nn = nn + 1 END DO END DO @@ -722,9 +836,11 @@ SUBROUTINE test_datasetND(rank) ALLOCATE(rbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) ALLOCATE(dbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) ALLOCATE(dbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(cbuf_6 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) + ALLOCATE(cbufr_6(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6)) dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,0/) - + nn = 1 DO i = 1, DIM1 DO j = 1, DIM2 @@ -735,6 +851,7 @@ SUBROUTINE test_datasetND(rank) ibuf_6(i,j,k,l,m,n) = INT(nn) rbuf_6(i,j,k,l,m,n) = INT(nn) dbuf_6(i,j,k,l,m,n) = INT(nn) + WRITE(cbuf_6(i,j,k,l,m,n),'(I5.5)') nn nn = nn + 1 END DO END DO @@ -742,18 +859,20 @@ SUBROUTINE test_datasetND(rank) ENDDO ENDDO ENDDO - + ELSE IF(rank.EQ.7)THEN - + ALLOCATE(ibuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) ALLOCATE(ibufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) ALLOCATE(rbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) ALLOCATE(rbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) ALLOCATE(dbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) ALLOCATE(dbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(cbuf_7 (1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) + ALLOCATE(cbufr_7(1:DIM1,1:DIM2,1:DIM3,1:DIM4,1:DIM5,1:DIM6,1:DIM7)) dims(1:7) = (/DIM1,DIM2,DIM3,DIM4,DIM5,DIM6,DIM7/) - + nn = 1 DO i = 1, DIM1 DO j = 1, DIM2 @@ -765,6 +884,7 @@ SUBROUTINE test_datasetND(rank) ibuf_7(i,j,k,l,m,n,o) = INT(nn) rbuf_7(i,j,k,l,m,n,o) = INT(nn) dbuf_7(i,j,k,l,m,n,o) = INT(nn) + WRITE(cbuf_7(i,j,k,l,m,n,o),'(I5.5)') nn nn = nn + 1 END DO END DO @@ -803,7 +923,7 @@ SUBROUTINE test_datasetND(rank) ELSE IF(rank.EQ.7)THEN CALL h5ltmake_dataset_f(file_id, dsetname2, rank, dims(1:rank), H5T_NATIVE_INTEGER, ibuf_7, errcode) ENDIF - + ! ! read dataset. @@ -874,7 +994,7 @@ SUBROUTINE test_datasetND(rank) IF(rank.EQ.4)THEN f_ptr = C_LOC(rbuf_4(1,1,1,1)) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) - ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) + ! CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_4, errcode) ELSE IF(rank.EQ.5)THEN f_ptr = C_LOC(rbuf_5(1,1,1,1,1)) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) @@ -887,7 +1007,7 @@ SUBROUTINE test_datasetND(rank) CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, f_ptr, errcode) !CALL h5ltmake_dataset_f(file_id, dsetname3, rank, dims(1:rank), H5T_NATIVE_REAL, rbuf_7, errcode) ENDIF - + ! ! read dataset. @@ -972,7 +1092,6 @@ SUBROUTINE test_datasetND(rank) f_ptr = C_LOC(dbuf_7(1,1,1,1,1,1,1)) CALL h5ltmake_dataset_f(file_id, dsetname4, rank, dims(1:rank), H5T_NATIVE_DOUBLE, f_ptr, errcode) ENDIF - ! ! read dataset. @@ -1037,8 +1156,97 @@ SUBROUTINE test_datasetND(rank) ENDDO ENDDO + !------------------------------------------------------------------------- + ! H5T_NATIVE_CHARACTER ND buffer + !------------------------------------------------------------------------- + + CALL H5Tcopy_f(H5T_FORTRAN_S1, type_id, errcode) + CALL H5Tset_size_f(type_id, 5_SIZE_T, errcode) + ! + ! write dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(cbuf_4(1,1,1,1)(1:1)) + CALL h5ltmake_dataset_f(file_id, dsetname5, rank, dims(1:rank), type_id, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(cbuf_5(1,1,1,1,1)(1:1)) + CALL h5ltmake_dataset_f(file_id, dsetname5, rank, dims(1:rank), type_id, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(cbuf_6(1,1,1,1,1,1)(1:1)) + CALL h5ltmake_dataset_f(file_id, dsetname5, rank, dims(1:rank), type_id, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(cbuf_7(1,1,1,1,1,1,1)(1:1)) + CALL h5ltmake_dataset_f(file_id, dsetname5, rank, dims(1:rank), type_id, f_ptr, errcode) + ENDIF + + ! + ! read dataset. + ! + IF(rank.EQ.4)THEN + f_ptr = C_LOC(cbufr_4(1,1,1,1)(1:1)) + CALL h5ltread_dataset_f(file_id, dsetname5, type_id, f_ptr, errcode) + ELSE IF(rank.EQ.5)THEN + f_ptr = C_LOC(cbufr_5(1,1,1,1,1)(1:1)) + CALL h5ltread_dataset_f(file_id, dsetname5, type_id, f_ptr, errcode) + ELSE IF(rank.EQ.6)THEN + f_ptr = C_LOC(cbufr_6(1,1,1,1,1,1)(1:1)) + CALL h5ltread_dataset_f(file_id, dsetname5, type_id, f_ptr, errcode) + ELSE IF(rank.EQ.7)THEN + f_ptr = C_LOC(cbufr_7(1,1,1,1,1,1,1)(1:1)) + CALL h5ltread_dataset_f(file_id, dsetname5, type_id, f_ptr, errcode) + ENDIF + + + ! + ! compare read and write buffers. + ! + DO i = 1, dims(1) + DO j = 1, dims(2) + DO k = 1, dims(3) + DO l = 1, dims(4) + IF(rank.EQ.4)THEN + IF ( cbuf_4(i,j,k,l) .NE. cbufr_4(i,j,k,l) ) THEN + PRINT *, 'read buffer differs from write buffer (character)' + PRINT *, cbuf_4(i,j,k,l), ' and ', cbufr_4(i,j,k,l) + STOP + ENDIF + ENDIF + DO m = 1, dims(5) + IF(rank.EQ.5)THEN + IF ( cbuf_5(i,j,k,l,m) .NE. cbufr_5(i,j,k,l,m) ) THEN + PRINT *, 'read buffer differs from write buffer (character)' + PRINT *, cbuf_5(i,j,k,l,m), ' and ', cbufr_5(i,j,k,l,m) + STOP + ENDIF + ENDIF + DO n = 1, dims(6) + IF(rank.EQ.6)THEN + IF ( cbuf_6(i,j,k,l,m,n) .NE. cbufr_6(i,j,k,l,m,n) ) THEN + PRINT *, 'read buffer differs from write buffer (character)' + PRINT *, cbuf_6(i,j,k,l,m,n), ' and ', cbufr_6(i,j,k,l,m,n) + STOP + ENDIF + ENDIF + DO o = 1, dims(7) + IF(rank.EQ.7)THEN + IF ( cbuf_7(i,j,k,l,m,n,o) .NE. cbufr_7(i,j,k,l,m,n,o) ) THEN + PRINT *, 'read buffer differs from write buffer (character)' + PRINT *, cbuf_7(i,j,k,l,m,n,o), ' and ', cbufr_7(i,j,k,l,m,n,o) + STOP + ENDIF + ENDIF + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + ENDDO + CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) + CALL h5tclose_f(type_id,errcode) + ! ! compare dimensions ! @@ -1062,13 +1270,13 @@ SUBROUTINE test_datasetND(rank) ! DEALLOCATE RESOURCES IF(rank.EQ.4)THEN - DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4) + DEALLOCATE(ibuf_4, ibufr_4, rbuf_4, rbufr_4, dbuf_4, dbufr_4, cbuf_4, cbufr_4) ELSE IF(rank.EQ.5)THEN - DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5) + DEALLOCATE(ibuf_5, ibufr_5, rbuf_5, rbufr_5, dbuf_5, dbufr_5, cbuf_5, cbufr_5) ELSE IF(rank.EQ.6)THEN - DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6) + DEALLOCATE(ibuf_6, ibufr_6, rbuf_6, rbufr_6, dbuf_6, dbufr_6, cbuf_6, cbufr_6) ELSE IF(rank.EQ.7)THEN - DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7) + DEALLOCATE(ibuf_7, ibufr_7, rbuf_7, rbufr_7, dbuf_7, dbufr_7, cbuf_7, cbufr_7) ENDIF CALL passed() @@ -1078,7 +1286,6 @@ SUBROUTINE test_datasetND(rank) END SUBROUTINE test_datasetND - !------------------------------------------------------------------------- ! test_datasets !------------------------------------------------------------------------- @@ -1094,7 +1301,7 @@ SUBROUTINE test_datasets() CHARACTER(len=9), PARAMETER :: filename = "dsetf4.h5"! File name INTEGER(HID_T) :: file_id ! File identifier INTEGER :: errcode ! Error flag - INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array + INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array CHARACTER(LEN=5), PARAMETER :: dsetname1 = "dset1" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname2 = "dset2" ! Dataset name CHARACTER(LEN=5), PARAMETER :: dsetname3 = "dset3" ! Dataset name @@ -1108,10 +1315,10 @@ SUBROUTINE test_datasets() CHARACTER(LEN=8) :: buf1r ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer - REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer - REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer - DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer + REAL, DIMENSION(DIM1), TARGET :: buf3 ! Data buffer + REAL, DIMENSION(DIM1) , TARGET :: bufr3 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: buf4 ! Data buffer + DOUBLE PRECISION, DIMENSION(DIM1), TARGET :: bufr4 ! Data buffer INTEGER :: i, n ! general purpose integer INTEGER :: has ! general purpose integer INTEGER :: type_class @@ -1289,7 +1496,7 @@ SUBROUTINE test_datasets() IF(errcode.LT.0.OR..NOT.path_valid)THEN PRINT *, 'error in h5ltpath_valid_f' STOP - ENDIF + ENDIF ! Should fail, dataset does not exist CALL h5ltpath_valid_f(file_id, "/"//dsetname2//"junk", .TRUE., path_valid, errcode) @@ -1306,14 +1513,14 @@ SUBROUTINE test_datasets() ! Create a dangling soft link CALL h5lcreate_soft_f("/G2", file_id, "/G3", errcode) - + ! Should pass, does not check for dangled link CALL h5ltpath_valid_f(file_id, "/G3", .FALSE., path_valid, errcode) IF(.NOT.path_valid)THEN PRINT *, 'error in h5ltpath_valid_f' STOP ENDIF - + ! Should fail, dangled link CALL h5ltpath_valid_f(file_id, "/G2", .TRUE., path_valid, errcode) IF(path_valid)THEN @@ -1336,7 +1543,6 @@ SUBROUTINE test_datasets() STOP ENDIF - !------------------------------------------------------------------------- ! test h5ltfind_dataset_f function !------------------------------------------------------------------------- @@ -1352,7 +1558,6 @@ SUBROUTINE test_datasets() ! test h5ltget_dataset_info_f function !------------------------------------------------------------------------- - CALL h5ltget_dataset_info_f(file_id,dsetname4,dimsr,type_class,type_size,errcode ) ! @@ -1402,7 +1607,7 @@ SUBROUTINE test_attributes() CHARACTER(len=9), PARAMETER :: filename = "dsetf5.h5"! File name CHARACTER(len=9), PARAMETER :: filename1 ="tattr.h5" ! C written attribute file INTEGER(HID_T) :: file_id ! File identifier -! INTEGER(HID_T) :: file_id1 + ! INTEGER(HID_T) :: file_id1 INTEGER, PARAMETER :: DIM1 = 10 ! Dimension of array CHARACTER(LEN=5), PARAMETER :: attrname1 = "attr1" ! Attribute name CHARACTER(LEN=5), PARAMETER :: attrname2 = "attr2" ! Attribute name @@ -1413,8 +1618,8 @@ SUBROUTINE test_attributes() CHARACTER(LEN=16), PARAMETER :: buf_c = "string attribute" CHARACTER(LEN=8) :: bufr1 ! Data buffer CHARACTER(LEN=10) :: bufr1_lg ! Data buffer -! CHARACTER(LEN=16) :: bufr_c ! Data buffer -! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer + ! CHARACTER(LEN=16) :: bufr_c ! Data buffer + ! CHARACTER(LEN=18) :: bufr_c_lg ! Data buffer INTEGER, DIMENSION(DIM1) :: buf2 ! Data buffer INTEGER, DIMENSION(DIM1) :: bufr2 ! Data buffer REAL, DIMENSION(DIM1), target :: buf3 ! Data buffer @@ -1547,41 +1752,41 @@ SUBROUTINE test_attributes() IF(SizeOf_buf_type.LT.16)THEN ! MSB can't handle 16 byte reals - CALL test_begin(' Set/Get attributes double ') + CALL test_begin(' Set/Get attributes double ') - ! - ! write attribute. - ! - f_ptr = C_LOC(buf4(1)) - CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) + ! + ! write attribute. + ! + f_ptr = C_LOC(buf4(1)) + CALL h5ltset_attribute_f(file_id,dsetname1,attrname4,f_ptr,"real", SizeOf_buf_type, size, errcode) -! CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4, size, errcode) + ! CALL h5ltset_attribute_double_f(file_id,dsetname1,attrname4,buf4, size, errcode) - ! - ! read attribute. - ! + ! + ! read attribute. + ! #ifdef H5_FORTRAN_HAVE_STORAGE_SIZE - SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) + SizeOf_buf_type = STORAGE_SIZE(bufr4(1), c_size_t)/STORAGE_SIZE(c_char_'a',c_size_t) #else - SizeOf_buf_type = SIZEOF(bufr4(1)) + SizeOf_buf_type = SIZEOF(bufr4(1)) #endif - f_ptr = C_LOC(bufr4(1)) - CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) + f_ptr = C_LOC(bufr4(1)) + CALL h5ltget_attribute_f(file_id,dsetname1,attrname4,f_ptr,"REAL",SizeOf_buf_type,errcode) - ! - ! compare read and write buffers. - ! - DO i = 1, DIM1 - IF ( buf4(i) .NE. bufr4(i) ) THEN - PRINT *, 'read buffer differs from write buffer' - PRINT *, bufr4(i), ' and ', buf4(i) - STOP - ENDIF - END DO - - CALL passed() + ! + ! compare read and write buffers. + ! + DO i = 1, DIM1 + IF ( buf4(i) .NE. bufr4(i) ) THEN + PRINT *, 'read buffer differs from write buffer' + PRINT *, bufr4(i), ' and ', buf4(i) + STOP + ENDIF + END DO + + CALL passed() ENDIF diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index 9f97734..f4c9b48 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -460,6 +460,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index 61d2e05..78ef042 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -510,6 +510,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 813b766..64e0d23 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -459,6 +459,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index 5dda20f..b41fcb3 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -473,6 +473,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/hl/tools/h5watch/Makefile.in b/hl/tools/h5watch/Makefile.in index 0e229c9..489f171 100644 --- a/hl/tools/h5watch/Makefile.in +++ b/hl/tools/h5watch/Makefile.in @@ -476,6 +476,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/src/H5config.h.in b/src/H5config.h.in index cca6e34..d6f5258 100644 --- a/src/H5config.h.in +++ b/src/H5config.h.in @@ -48,6 +48,9 @@ /* Determine the size of C long double */ #undef FORTRAN_SIZEOF_LONG_DOUBLE +/* Define Fortran compiler ID */ +#undef Fortran_COMPILER_ID + /* Define valid Fortran INTEGER KINDs */ #undef H5CONFIG_F_IKIND diff --git a/src/Makefile.in b/src/Makefile.in index ad466fb..34fde74 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -525,6 +525,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 5fe51ed..10f4ccf 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -451,6 +451,7 @@ set_tests_properties (H5TEST-flush2 PROPERTIES DEPENDS H5TEST-flush1) set_tests_properties (H5TEST-fheap PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-big PROPERTIES TIMEOUT 1800) +set_tests_properties (H5TEST-objcopy PROPERTIES TIMEOUT 2400) if (BUILD_SHARED_LIBS) # Remove any output file left over from previous test run @@ -541,6 +542,7 @@ if (BUILD_SHARED_LIBS) set_tests_properties (H5TEST-shared-fheap PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-shared-testmeta PROPERTIES TIMEOUT 1800) set_tests_properties (H5TEST-shared-big PROPERTIES TIMEOUT 1800) + set_tests_properties (H5TEST-shared-objcopy PROPERTIES TIMEOUT 2400) endif (BUILD_SHARED_LIBS) ############################################################################## @@ -562,9 +564,10 @@ if (NOT CYGWIN) add_test (NAME H5TEST-cache COMMAND $<TARGET_FILE:cache>) set_tests_properties (H5TEST-cache PROPERTIES DEPENDS H5TEST-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) + set_tests_properties (H5TEST-cache PROPERTIES TIMEOUT 2400) endif (NOT CYGWIN) #-- Adding test for cache_api @@ -725,9 +728,10 @@ if (BUILD_SHARED_LIBS) add_test (NAME H5TEST-shared-cache COMMAND $<TARGET_FILE:cache-shared>) set_tests_properties (H5TEST-shared-cache PROPERTIES DEPENDS H5TEST-shared-clear-cache-objects - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/H5TEST-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST-shared ) + set_tests_properties (H5TEST-shared-cache PROPERTIES TIMEOUT 2400) endif (NOT CYGWIN) #-- Adding test for cache_api @@ -1052,7 +1056,7 @@ if (HDF5_TEST_VFD) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${vfdtest} PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) if (BUILD_SHARED_LIBS) @@ -1068,7 +1072,7 @@ if (HDF5_TEST_VFD) -P "${HDF_RESOURCES_DIR}/vfdTest.cmake" ) set_tests_properties (VFD-${vfdname}-${vfdtest}-shared PROPERTIES - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) endif (BUILD_SHARED_LIBS) @@ -1136,7 +1140,7 @@ if (HDF5_TEST_VFD) ) set_tests_properties (VFD-${vfdname}-fheap PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname};HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname} ) if (BUILD_SHARED_LIBS) @@ -1153,7 +1157,7 @@ if (HDF5_TEST_VFD) ) set_tests_properties (VFD-${vfdname}-fheap-shared PROPERTIES TIMEOUT 1800 - ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=2" + ENVIRONMENT "srcdir=${HDF5_TEST_BINARY_DIR}/${vfdname}-shared;HDF5TestExpress=${HDF_TEST_EXPRESS}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/${vfdname}-shared ) endif (BUILD_SHARED_LIBS) diff --git a/test/Makefile.in b/test/Makefile.in index d0270ba..112837d 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -984,6 +984,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index e70d05e..223247a 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -492,6 +492,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/Makefile.in b/tools/Makefile.in index 6d699eb..d8678e2 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -459,6 +459,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index 57c0a38..3900396 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -467,6 +467,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index 638afd6..ebfb680 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -474,6 +474,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index cfb268c..208e4e0 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -473,6 +473,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5format_convert/Makefile.in b/tools/h5format_convert/Makefile.in index 43700b0..d46643a 100644 --- a/tools/h5format_convert/Makefile.in +++ b/tools/h5format_convert/Makefile.in @@ -472,6 +472,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index 3185d72..938f3d9 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -467,6 +467,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index 8e5f994..9452a9b 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -479,6 +479,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index b23d07f..73bef6c 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -459,6 +459,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 6868523..02be99d 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -491,6 +491,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index a03b765..e0d095d 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -469,6 +469,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index ab7940e..ba26950 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -456,6 +456,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 707fa58..59cfde4 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -513,6 +513,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index 292a65b..dbac43e 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -498,6 +498,7 @@ FORTRAN_C_LONG_DOUBLE_IS_UNIQUE = @FORTRAN_C_LONG_DOUBLE_IS_UNIQUE@ FORTRAN_HAVE_C_LONG_DOUBLE = @FORTRAN_HAVE_C_LONG_DOUBLE@ FORTRAN_SIZEOF_LONG_DOUBLE = @FORTRAN_SIZEOF_LONG_DOUBLE@ FSEARCH_DIRS = @FSEARCH_DIRS@ +Fortran_COMPILER_ID = @Fortran_COMPILER_ID@ GREP = @GREP@ H5CONFIG_F_IKIND = @H5CONFIG_F_IKIND@ H5CONFIG_F_NUM_IKIND = @H5CONFIG_F_NUM_IKIND@ |