summaryrefslogtreecommitdiffstats
path: root/fortran/test
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test')
-rw-r--r--fortran/test/CMakeLists.txt172
-rw-r--r--fortran/test/CMakeTests.cmake4
-rw-r--r--fortran/test/Makefile.am18
-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)6
-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)120
-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
33 files changed, 222 insertions, 98 deletions
diff --git a/fortran/test/CMakeLists.txt b/fortran/test/CMakeLists.txt
index 19d4975..692cc4d 100644
--- a/fortran/test/CMakeLists.txt
+++ b/fortran/test/CMakeLists.txt
@@ -22,7 +22,7 @@ set_target_properties (${HDF5_F90_C_TEST_LIB_TARGET} PROPERTIES
LINKER_LANGUAGE C
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED t.c)
TARGET_C_PROPERTIES (${HDF5_F90_C_TEST_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_TEST_LIBSH_TARGET}
@@ -37,13 +37,13 @@ if (BUILD_SHARED_LIBS)
INTERFACE_INCLUDE_DIRECTORIES "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
-endif (BUILD_SHARED_LIBS)
+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)
-if (BUILD_SHARED_LIBS)
+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)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
TARGET_FORTRAN_PROPERTIES (${HDF5_F90_TEST_LIB_TARGET} STATIC " " " ")
target_link_libraries (${HDF5_F90_TEST_LIB_TARGET}
@@ -64,7 +64,7 @@ if (WIN32)
COMPILE_DEFINITIONS "HDF5F90_WINDOWS"
)
endif (WIN32)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
set (SHARED_LINK_FLAGS "/DLL")
@@ -90,7 +90,7 @@ if (BUILD_SHARED_LIBS)
COMPILE_DEFINITIONS "BUILD_HDF5_TEST_DLL;HDF5F90_WINDOWS"
)
endif (WIN32)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
@@ -132,25 +132,25 @@ add_custom_command (
#-- Adding test for testhdf5_fortran
add_executable (testhdf5_fortran
- fortranlib_test.f90
- tH5A.f90
- tH5D.f90
- tH5E.f90
- tH5F.f90
- tH5G.f90
- tH5I.f90
- tH5P.f90
- tH5R.f90
- tH5S.f90
- tH5Sselect.f90
- tH5T.f90
- tH5VL.f90
- tH5Z.f90
- tHDF5.f90
+ fortranlib_test.F90
+ tH5A.F90
+ tH5D.F90
+ tH5E.F90
+ tH5F.F90
+ tH5G.F90
+ tH5I.F90
+ tH5P.F90
+ tH5R.F90
+ tH5S.F90
+ tH5Sselect.F90
+ tH5T.F90
+ tH5VL.F90
+ tH5Z.F90
+ tHDF5.F90
)
TARGET_NAMING (testhdf5_fortran STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran STATIC " " " ")
-target_link_libraries (testhdf5_fortran
+target_link_libraries (testhdf5_fortran
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -164,27 +164,27 @@ set_target_properties (testhdf5_fortran PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran-shared
- fortranlib_test.f90
- tH5A.f90
- tH5D.f90
- tH5E.f90
- tH5F.f90
- tH5G.f90
- tH5I.f90
- tH5P.f90
- tH5R.f90
- tH5S.f90
- tH5Sselect.f90
- tH5T.f90
- tH5VL.f90
- tH5Z.f90
- tHDF5.f90
+ fortranlib_test.F90
+ tH5A.F90
+ tH5D.F90
+ tH5E.F90
+ tH5F.F90
+ tH5G.F90
+ tH5I.F90
+ tH5P.F90
+ tH5R.F90
+ tH5S.F90
+ tH5Sselect.F90
+ tH5T.F90
+ tH5VL.F90
+ tH5Z.F90
+ tHDF5.F90
)
TARGET_NAMING (testhdf5_fortran-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran-shared
+ target_link_libraries (testhdf5_fortran-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -198,20 +198,20 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for testhdf5_fortran_1_8
add_executable (testhdf5_fortran_1_8
- fortranlib_test_1_8.f90
- tH5O.f90
- tH5A_1_8.f90
- tH5G_1_8.f90
- tH5MISC_1_8.f90
- tHDF5_1_8.f90
+ fortranlib_test_1_8.F90
+ tH5O.F90
+ tH5A_1_8.F90
+ tH5G_1_8.F90
+ tH5MISC_1_8.F90
+ tHDF5_1_8.F90
)
TARGET_NAMING (testhdf5_fortran_1_8 STATIC)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8 STATIC " " " ")
-target_link_libraries (testhdf5_fortran_1_8
+target_link_libraries (testhdf5_fortran_1_8
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -225,18 +225,18 @@ set_target_properties (testhdf5_fortran_1_8 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (testhdf5_fortran_1_8-shared
- fortranlib_test_1_8.f90
- tH5O.f90
- tH5A_1_8.f90
- tH5G_1_8.f90
- tH5MISC_1_8.f90
- tHDF5_1_8.f90
+ fortranlib_test_1_8.F90
+ tH5O.F90
+ tH5A_1_8.F90
+ tH5G_1_8.F90
+ tH5MISC_1_8.F90
+ tHDF5_1_8.F90
)
TARGET_NAMING (testhdf5_fortran_1_8-shared SHARED)
TARGET_FORTRAN_PROPERTIES (testhdf5_fortran_1_8-shared SHARED " " " ")
- target_link_libraries (testhdf5_fortran_1_8-shared
+ target_link_libraries (testhdf5_fortran_1_8-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -250,22 +250,22 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fortranlib_test_F03
add_executable (fortranlib_test_F03
- fortranlib_test_F03.f90
- tH5E_F03.f90
- tH5F_F03.f90
- tH5L_F03.f90
- tH5O_F03.f90
- tH5P_F03.f90
+ fortranlib_test_F03.F90
+ tH5E_F03.F90
+ tH5F_F03.F90
+ tH5L_F03.F90
+ tH5O_F03.F90
+ tH5P_F03.F90
tH5T_F03.F90
- tHDF5_F03.f90
+ tHDF5_F03.F90
)
TARGET_NAMING (fortranlib_test_F03 STATIC)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03 STATIC " " " ")
-target_link_libraries (fortranlib_test_F03
+target_link_libraries (fortranlib_test_F03
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -279,20 +279,20 @@ set_target_properties (fortranlib_test_F03 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (fortranlib_test_F03-shared
- fortranlib_test_F03.f90
- tH5E_F03.f90
- tH5F_F03.f90
- tH5L_F03.f90
- tH5O_F03.f90
- tH5P_F03.f90
+ fortranlib_test_F03.F90
+ tH5E_F03.F90
+ tH5F_F03.F90
+ tH5L_F03.F90
+ tH5O_F03.F90
+ tH5P_F03.F90
tH5T_F03.F90
- tHDF5_F03.f90
+ tHDF5_F03.F90
)
TARGET_NAMING (fortranlib_test_F03-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fortranlib_test_F03-shared SHARED " " " ")
- target_link_libraries (fortranlib_test_F03-shared
+ target_link_libraries (fortranlib_test_F03-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -306,13 +306,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush1
-add_executable (fflush1 fflush1.f90)
+add_executable (fflush1 fflush1.F90)
TARGET_NAMING (fflush1 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush1 STATIC " " " ")
-target_link_libraries (fflush1
+target_link_libraries (fflush1
${HDF5_F90_LIB_TARGET}
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -326,11 +326,11 @@ set_target_properties (fflush1 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
- add_executable (fflush1-shared fflush1.f90)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ add_executable (fflush1-shared fflush1.F90)
TARGET_NAMING (fflush1-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush1-shared SHARED " " " ")
- target_link_libraries (fflush1-shared
+ target_link_libraries (fflush1-shared
${HDF5_F90_LIBSH_TARGET}
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -344,13 +344,13 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-- Adding test for fflush2
-add_executable (fflush2 fflush2.f90)
+add_executable (fflush2 fflush2.F90)
TARGET_NAMING (fflush2 STATIC)
TARGET_FORTRAN_PROPERTIES (fflush2 STATIC " " " ")
-target_link_libraries (fflush2
+target_link_libraries (fflush2
${HDF5_F90_TEST_LIB_TARGET}
${HDF5_F90_LIB_TARGET}
${HDF5_LIB_TARGET}
@@ -364,11 +364,11 @@ set_target_properties (fflush2 PROPERTIES
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
)
-if (BUILD_SHARED_LIBS)
- add_executable (fflush2-shared fflush2.f90)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ add_executable (fflush2-shared fflush2.F90)
TARGET_NAMING (fflush2-shared SHARED)
TARGET_FORTRAN_PROPERTIES (fflush2-shared SHARED " " " ")
- target_link_libraries (fflush2-shared
+ target_link_libraries (fflush2-shared
${HDF5_F90_TEST_LIBSH_TARGET}
${HDF5_F90_LIBSH_TARGET}
${HDF5_LIBSH_TARGET}
@@ -382,6 +382,6 @@ if (BUILD_SHARED_LIBS)
FOLDER test/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
include (CMakeTests.cmake)
diff --git a/fortran/test/CMakeTests.cmake b/fortran/test/CMakeTests.cmake
index 94f6b64..154e70c 100644
--- a/fortran/test/CMakeTests.cmake
+++ b/fortran/test/CMakeTests.cmake
@@ -27,7 +27,7 @@ add_test (NAME FORTRAN_fflush1 COMMAND $<TARGET_FILE:fflush1>)
add_test (NAME FORTRAN_fflush2 COMMAND $<TARGET_FILE:fflush2>)
set_tests_properties (FORTRAN_fflush2 PROPERTIES DEPENDS FORTRAN_fflush1)
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME FORTRAN_testhdf5_fortran-shared COMMAND $<TARGET_FILE:testhdf5_fortran-shared>)
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES PASS_REGULAR_EXPRESSION "[ ]*0 error.s")
set_tests_properties (FORTRAN_testhdf5_fortran-shared PROPERTIES DEPENDS FORTRAN_testhdf5_fortran)
@@ -51,4 +51,4 @@ if (BUILD_SHARED_LIBS)
#-- Adding test for fflush2
add_test (NAME FORTRAN_fflush2-shared COMMAND $<TARGET_FILE:fflush2-shared>)
set_tests_properties (FORTRAN_fflush2-shared PROPERTIES DEPENDS FORTRAN_fflush1-shared)
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
diff --git a/fortran/test/Makefile.am b/fortran/test/Makefile.am
index 608b1e9..c12233c 100644
--- a/fortran/test/Makefile.am
+++ b/fortran/test/Makefile.am
@@ -48,18 +48,18 @@ libh5test_fortran_la_SOURCES = tf_gen.F90 tf.F90 t.c
fortranlib_test_FCFLAGS=$(AM_FCFLAGS)
fortranlib_test_CFLAGS=$(AM_CFLAGS)
-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)
@@ -106,4 +106,4 @@ H5_test_buildiface_LDADD =
fflush2.chkexe_: fflush1.chkexe_
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
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 79ff161..c3e995b 100644
--- a/fortran/test/fortranlib_test.f90
+++ b/fortran/test/fortranlib_test.F90
@@ -94,6 +94,12 @@ PROGRAM fortranlibtest
CALL extenddsettest(cleanup, ret_total_error)
CALL write_test_status(ret_total_error, ' Extendible dataset test', total_error)
+! -- 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(*,*) '========================================='
! write(*,*) 'Testing DATASPACE Interface '
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 b5febb3..c9ba952 100644
--- a/fortran/test/tH5D.f90
+++ b/fortran/test/tH5D.F90
@@ -343,7 +343,7 @@ CONTAINS
!Modify dataset creation properties, i.e. enable chunking
!
CALL h5pcreate_f(H5P_DATASET_CREATE_F, crp_list, error)
- CALL check("h5pcreat_f",error,total_error)
+ CALL check("h5pcreate_f",error,total_error)
CALL h5pset_chunk_f(crp_list, RANK, dims1, error)
CALL check("h5pset_chunk_f",error,total_error)
@@ -508,5 +508,123 @@ CONTAINS
RETURN
END SUBROUTINE extenddsettest
+
+!
+! The following subroutine tests h5dget_offset_f functionality
+!
+
+ SUBROUTINE test_userblock_offset(cleanup, total_error)
+
+ USE ISO_C_BINDING
+
+ IMPLICIT NONE
+ LOGICAL, INTENT(IN) :: cleanup
+ INTEGER, INTENT(OUT) :: total_error
+ !
+ !the dataset is stored in file "offset.h5"
+ !
+ INTEGER, PARAMETER :: dset_dim1=2, dset_dim2=10
+ CHARACTER(LEN=6), PARAMETER :: filename = "offset"
+ CHARACTER(LEN=80) :: fix_filename
+
+ INTEGER(hid_t) :: file, fcpl, dataset, space
+ INTEGER :: i, j, n, ios
+ INTEGER(hsize_t), DIMENSION(1:2) :: dims
+ INTEGER :: f
+ INTEGER(haddr_t) :: offset
+ INTEGER, DIMENSION(1:dset_dim1,1:dset_dim2), TARGET :: rdata, data_in
+ INTEGER :: error
+ TYPE(C_PTR) :: f_ptr
+ !
+ !Create a new file using default properties.
+ !
+ CALL h5_fixname_f(filename, fix_filename, H5P_DEFAULT_F, error)
+ IF (error .NE. 0) THEN
+ WRITE(*,*) "Cannot modify filename"
+ STOP
+ ENDIF
+
+ CALL h5pcreate_f(H5P_FILE_CREATE_F, fcpl, error)
+ CALL check("h5pcreate_f",error,total_error)
+
+ ! Initialize the dataset
+ n = 0
+ DO i = 1, dset_dim1
+ DO j = 1, dset_dim2
+ n = n + 1
+ data_in(i,j) = n
+ END DO
+ END DO
+ CALL h5fcreate_f(fix_filename, H5F_ACC_TRUNC_F, file, error, fcpl)
+ CALL check("h5fcreate_f",error,total_error)
+
+ ! Create the data space
+ dims(1:2) = (/dset_dim1,dset_dim2/)
+
+ CALL h5screate_simple_f(2, dims, space, error)
+ CALL check("h5screate_simple_f",error,total_error)
+
+ ! Create the dataset
+ CALL h5dcreate_f(file, "dset1", H5T_NATIVE_INTEGER, space, dataset, error)
+ CALL check("h5dcreate_f", error, total_error)
+
+ ! Test dataset address. Should be undefined.
+ CALL h5dget_offset_f(dataset, offset, error)
+ CALL VERIFY("h5dget_offset_f",offset, HADDR_UNDEF_F, total_error)
+
+ ! Write the data to the dataset
+ f_ptr = C_LOC(data_in(1,1))
+ CALL h5dwrite_f(dataset, H5T_NATIVE_INTEGER, f_ptr, error)
+ CALL check("h5dwrite_f", error, total_error)
+
+ ! Test dataset address in file. Open the same file as a C file, seek
+ ! the data position as H5Dget_offset points to, read the dataset, and
+ ! compare it with the data written in.
+ CALL h5dget_offset_f(dataset, offset, error)
+ CALL check("h5dget_offset_f", error, total_error)
+ IF(offset.EQ.HADDR_UNDEF_F)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5dclose_f(dataset, error)
+ CALL check("h5dclose_f", error, total_error)
+ CALL h5fclose_f(file, error)
+ CALL check("h5fclose_f", error, total_error)
+
+ IF(total_error.NE.0) RETURN
+
+ OPEN(10,FILE=fix_filename, ACCESS="STREAM", IOSTAT=ios)
+ IF(ios.NE.0)THEN
+ WRITE(*,'(A)') "Failed to open file "//TRIM(fix_filename)
+ total_error = total_error + 1
+ RETURN
+ ENDIF
+ ! The pos= specifier illustrates that positions are in bytes,
+ ! starting from byte 1 (as opposed to C, where they start from byte 0)
+ READ(10, POS=offset+1, IOSTAT=ios) rdata
+ IF(ios.NE.0)THEN
+ WRITE(*,'(A)') "Failed to read data from stream I/O "
+ total_error = total_error + 1
+ CLOSE(10)
+ RETURN
+ ENDIF
+
+ ! Check that the values read are the same as the values written
+ DO i = 1, dset_dim1
+ DO j = 1, dset_dim2
+ CALL VERIFY("h5dget_offset_f",rdata(i,j), data_in(i,j), total_error)
+ IF(total_error.NE.0)THEN
+ WRITE(*,'(A)') " Read different values than written."
+ WRITE(*,'(2(A,I0))') " At index ",i,",",j
+ CLOSE(10)
+ RETURN
+ ENDIF
+ END DO
+ END DO
+
+ CLOSE(10)
+
+ END SUBROUTINE test_userblock_offset
+
END MODULE TH5D
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