summaryrefslogtreecommitdiffstats
path: root/fortran
diff options
context:
space:
mode:
Diffstat (limited to 'fortran')
-rw-r--r--fortran/examples/CMakeLists.txt12
-rw-r--r--fortran/examples/CMakeTests.cmake24
-rw-r--r--fortran/examples/Makefile.am2
-rw-r--r--fortran/src/CMakeLists.txt45
-rw-r--r--fortran/src/H5Dff.F903
-rw-r--r--fortran/src/H5_f.c15
-rw-r--r--fortran/src/H5_ff.F9011
-rw-r--r--fortran/src/H5config_f.inc.cmake3
-rw-r--r--fortran/src/H5config_f.inc.in3
-rw-r--r--fortran/src/H5f90global.F9012
-rw-r--r--fortran/src/H5f90proto.h12
-rw-r--r--fortran/src/Makefile.am7
-rw-r--r--fortran/src/hdf5_fortrandll.def.in3
-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
-rw-r--r--fortran/testpar/Makefile.am2
47 files changed, 312 insertions, 162 deletions
diff --git a/fortran/examples/CMakeLists.txt b/fortran/examples/CMakeLists.txt
index f2dc896..aad5f33 100644
--- a/fortran/examples/CMakeLists.txt
+++ b/fortran/examples/CMakeLists.txt
@@ -52,7 +52,7 @@ foreach (example ${examples})
FOLDER examples/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 (f90_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f90_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_${example}-shared SHARED " " " ")
@@ -66,7 +66,7 @@ foreach (example ${examples})
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${examples})
foreach (example ${F2003_examples})
@@ -83,7 +83,7 @@ foreach (example ${F2003_examples})
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_executable (f03_ex_${example}-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/${example}.f90)
TARGET_NAMING (f03_ex_${example}-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f03_ex_${example}-shared SHARED " " " ")
@@ -97,7 +97,7 @@ foreach (example ${F2003_examples})
FOLDER examples/fortran03
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${F2003_examples})
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
@@ -115,7 +115,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
FOLDER examples/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 (f90_ex_ph5example-shared ${HDF5_F90_EXAMPLES_SOURCE_DIR}/ph5example.f90)
TARGET_NAMING (f90_ex_ph5example-shared SHARED)
TARGET_FORTRAN_PROPERTIES (f90_ex_ph5example-shared SHARED " " " ")
@@ -130,7 +130,7 @@ if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
FOLDER examples/fortran
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/shared
)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
if (BUILD_TESTING)
diff --git a/fortran/examples/CMakeTests.cmake b/fortran/examples/CMakeTests.cmake
index 173984c..63e75c2 100644
--- a/fortran/examples/CMakeTests.cmake
+++ b/fortran/examples/CMakeTests.cmake
@@ -9,12 +9,12 @@
add_test (
NAME f90_ex-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
compound.h5
copy1.h5
copy2.h5
dsetf.h5
- extend.h5
+ extend.h5
FORTRAN.h5
groupf.h5
groupsf.h5
@@ -28,16 +28,16 @@
set_tests_properties (f90_ex-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-clear-objects")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (
NAME f90_ex-shared-clear-objects
COMMAND ${CMAKE_COMMAND}
- -E remove
+ -E remove
compound.h5
copy1.h5
copy2.h5
dsetf.h5
- extend.h5
+ extend.h5
FORTRAN.h5
groupf.h5
groupsf.h5
@@ -51,7 +51,7 @@
set_tests_properties (f90_ex-shared-clear-objects PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-shared-clear-objects")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
foreach (example ${examples})
add_test (NAME f90_ex_${example} COMMAND $<TARGET_FILE:f90_ex_${example}>)
@@ -59,13 +59,13 @@ foreach (example ${examples})
set_tests_properties (f90_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex_${example}")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f90_ex-shared_${example} COMMAND $<TARGET_FILE:f90_ex_${example}-shared>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f90_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f90_ex-shared_${example}")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${examples})
if (HDF5_ENABLE_F2003)
@@ -75,19 +75,19 @@ if (HDF5_ENABLE_F2003)
set_tests_properties (f03_ex_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f03_ex_${example}")
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f03_ex-shared_${example} COMMAND $<TARGET_FILE:f03_ex_${example}-shared>)
if (NOT "${last_test}" STREQUAL "")
set_tests_properties (f03_ex-shared_${example} PROPERTIES DEPENDS ${last_test})
endif (NOT "${last_test}" STREQUAL "")
set (last_test "f03_ex-shared_${example}")
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endforeach (example ${F2003_examples})
endif (HDF5_ENABLE_F2003)
if (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
add_test (NAME f90_ex_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_test (NAME f90_ex-shared_ph5example COMMAND ${MPIEXEC} ${MPIEXEC_PREFLAGS} ${MPIEXEC_NUMPROC_FLAG} ${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_POSTFLAGS} $<TARGET_FILE:f90_ex_ph5example>)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
endif (H5_HAVE_PARALLEL AND MPI_Fortran_FOUND)
diff --git a/fortran/examples/Makefile.am b/fortran/examples/Makefile.am
index cdd9317..5a3b09e 100644
--- a/fortran/examples/Makefile.am
+++ b/fortran/examples/Makefile.am
@@ -107,4 +107,4 @@ compound_fortran2003: compound_fortran2003.f90
compound_complex_fortran2003: compound_complex_fortran2003.f90
include $(top_srcdir)/config/examples.am
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 8f63b3c..d97e625 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -35,6 +35,8 @@ endif(HAVE_FLOAT128)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5config_f.inc.cmake ${CMAKE_BINARY_DIR}/H5config_f.inc @ONLY)
configure_file (${HDF5_F90_SRC_SOURCE_DIR}/H5fort_type_defines.h.in ${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h @ONLY)
+set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
+
#-----------------------------------------------------------------------------
# Setup the Fortran auto-detection utilities
# H5_buildiface.F90 used to generate various KIND interfaces
@@ -62,7 +64,22 @@ set_target_properties (H5_buildiface PROPERTIES
Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}
)
-INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY})
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+ if (WIN32)
+ set (MOD_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)
+ endif (WIN32)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
+
+INCLUDE_DIRECTORIES (${HDF5_F90_BINARY_DIR} ${CMAKE_Fortran_MODULE_DIRECTORY} ${MOD_BUILD_DIR})
+
#-----------------------------------------------------------------------------
add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
@@ -118,7 +135,7 @@ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
)
set (install_targets ${HDF5_F90_C_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SRCS} ${f90CStub_C_HDRS})
TARGET_C_PROPERTIES (${HDF5_F90_C_LIBSH_TARGET} SHARED " " " ")
target_link_libraries (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_LIBSH_TARGET} ${LINK_SHARED_LIBS})
@@ -132,7 +149,7 @@ if (BUILD_SHARED_LIBS)
INTERFACE_COMPILE_DEFINITIONS H5_BUILT_AS_DYNAMIC_LIB=1
)
set (install_targets ${install_targets} ${HDF5_F90_C_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
set_source_files_properties (${HDF5_F90_BINARY_DIR}/H5_gen.F90 PROPERTIES GENERATED TRUE)
@@ -206,7 +223,7 @@ if (WIN32)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
-if (BUILD_SHARED_LIBS)
+if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SRCS})
set (SHARED_LINK_FLAGS " ")
if (WIN32 AND MSVC)
@@ -233,7 +250,7 @@ if (BUILD_SHARED_LIBS)
)
endif (WIN32)
set (install_targets ${install_targets} ${HDF5_F90_LIBSH_TARGET})
-endif (BUILD_SHARED_LIBS)
+endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
#-----------------------------------------------------------------------------
# Add file(s) to CMake Install
@@ -251,20 +268,6 @@ install (
fortheaders
)
-if (BUILD_SHARED_LIBS)
- if (WIN32)
- set (MOD_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)
- 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)
-
set (mod_files
${MOD_BUILD_DIR}/h5fortran_types.mod
${MOD_BUILD_DIR}/hdf5.mod
@@ -298,10 +301,10 @@ install (
# Add Target(s) to CMake Install for import into other projects
#-----------------------------------------------------------------------------
if (HDF5_EXPORTED_TARGETS)
- if (BUILD_SHARED_LIBS)
+ if (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
INSTALL_TARGET_PDB (${HDF5_F90_C_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
#INSTALL_TARGET_PDB (${HDF5_F90_LIBSH_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- endif (BUILD_SHARED_LIBS)
+ endif (BUILD_SHARED_LIBS AND NOT SKIP_HDF5_FORTRAN_SHARED)
install (
TARGETS
diff --git a/fortran/src/H5Dff.F90 b/fortran/src/H5Dff.F90
index afdb5ba..e44d90e 100644
--- a/fortran/src/H5Dff.F90
+++ b/fortran/src/H5Dff.F90
@@ -1094,8 +1094,7 @@ CONTAINS
offset = h5dget_offset(dset_id)
- hdferr = 0
- IF(offset .LT. 0) hdferr = -1
+ hdferr = 0 ! never returns a function error because C API never returns a function error.
END SUBROUTINE h5dget_offset_f
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index e527dce..f3bc42f 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -436,11 +436,12 @@ h5close_types_c( hid_t_f * types, int_f *lentypes,
*/
int_f
h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
- int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags)
+ int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
+ int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
+ int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
+ hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
+ hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
+ haddr_t_f *h5_haddr_generic_flags)
/******/
{
int ret_value = -1;
@@ -773,7 +774,9 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5_generic_flags[5] = (int_f)H5_ITER_INC; /* Increasing order */
h5_generic_flags[6] = (int_f)H5_ITER_DEC; /* Decreasing order */
h5_generic_flags[7] = (int_f)H5_ITER_NATIVE; /* No particular order, whatever is fastest */
- h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+ h5_generic_flags[8] = (int_f)H5_ITER_N; /* Number of iteration orders */
+
+ h5_haddr_generic_flags[0] = (haddr_t_f)HADDR_UNDEF; /* undefined address */
ret_value = 0;
return ret_value;
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 4ceb1a8..169864f 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -105,16 +105,17 @@ CONTAINS
i_H5S_hsize_flags, &
i_H5T_flags, &
i_H5Z_flags, &
- i_H5generic_flags) &
+ i_H5generic_flags, &
+ i_H5generic_haddr_flags) &
BIND(C,NAME='h5init_flags_c')
- IMPORT :: HID_T, SIZE_T, HSIZE_T
+ IMPORT :: HID_T, SIZE_T, HSIZE_T, HADDR_T
IMPORT :: H5D_FLAGS_LEN, H5D_SIZE_FLAGS_LEN, &
H5E_FLAGS_LEN, H5E_HID_FLAGS_LEN, &
H5F_FLAGS_LEN, H5G_FLAGS_LEN, H5FD_FLAGS_LEN, &
H5FD_HID_FLAGS_LEN, H5I_FLAGS_LEN, H5L_FLAGS_LEN, &
H5O_FLAGS_LEN, H5P_FLAGS_LEN, H5P_FLAGS_INT_LEN, &
H5R_FLAGS_LEN, H5S_FLAGS_LEN, H5S_HSIZE_FLAGS_LEN, &
- H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN
+ H5T_FLAGS_LEN, H5Z_FLAGS_LEN, H5generic_FLAGS_LEN, H5generic_haddr_FLAGS_LEN
IMPLICIT NONE
INTEGER i_H5D_flags(H5D_FLAGS_LEN)
INTEGER(SIZE_T) i_H5D_size_flags(H5D_SIZE_FLAGS_LEN)
@@ -135,6 +136,7 @@ CONTAINS
INTEGER i_H5T_flags(H5T_FLAGS_LEN)
INTEGER i_H5Z_flags(H5Z_FLAGS_LEN)
INTEGER i_H5generic_flags(H5generic_FLAGS_LEN)
+ INTEGER(HADDR_T) i_H5generic_haddr_flags(H5generic_haddr_FLAGS_LEN)
END FUNCTION h5init_flags_c
END INTERFACE
INTERFACE
@@ -164,7 +166,8 @@ CONTAINS
H5S_hsize_flags, &
H5T_flags, &
H5Z_flags, &
- H5generic_flags)
+ H5generic_flags,&
+ H5generic_haddr_flags)
error_3 = h5init1_flags_c(H5LIB_flags )
error = error_1 + error_2 + error_3
END SUBROUTINE h5open_f
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/H5f90global.F90 b/fortran/src/H5f90global.F90
index c88327c..947eff4 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -316,6 +316,18 @@ MODULE H5GLOBAL
EQUIVALENCE(H5generic_flags(7), H5_ITER_DEC_F)
EQUIVALENCE(H5generic_flags(8), H5_ITER_NATIVE_F)
EQUIVALENCE(H5generic_flags(9), H5_ITER_N_F)
+
+ INTEGER, PARAMETER :: H5generic_haddr_FLAGS_LEN = 1
+ INTEGER(HADDR_T) :: H5generic_haddr_flags(H5generic_haddr_FLAGS_LEN)
+ !DEC$if defined(BUILD_HDF5_DLL)
+ !DEC$ATTRIBUTES DLLEXPORT :: /H5generic_haddr_FLAGS/
+ !DEC$endif
+ COMMON /H5generic_haddr_FLAGS/ H5generic_haddr_flags
+
+ INTEGER(HADDR_T) :: HADDR_UNDEF_F
+
+ EQUIVALENCE(H5generic_haddr_flags(1), HADDR_UNDEF_F)
+
!
! H5G flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index b26e985..1d08d7e 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -23,9 +23,6 @@
H5_FCDLL char * HD5f2cstring (_fcd fdesc, size_t len);
H5_FCDLL void HD5packFstring(char *src, char *dest, size_t len);
-#ifdef H5_VMS
-#define H5_FC_FUNC_(name, NAME) NAME
-#endif /*H5_VMS*/
/*
* Storage info struct used by H5O_info_t and H5F_info_t
@@ -527,10 +524,11 @@ H5_FCDLL int_f h5close_c(void);
H5_FCDLL int_f h5init_types_c(hid_t_f *types, hid_t_f *floatingtypes, hid_t_f *integertypes);
H5_FCDLL int_f h5close_types_c(hid_t_f *types, int_f *lentypes, hid_t_f *floatingtypes, int_f *floatinglen, hid_t_f *integertypes, int_f *integerlen);
H5_FCDLL int_f h5init_flags_c(int_f *h5d_flags, size_t_f *h5d_size_flags, int_f *h5e_flags, hid_t_f *h5e_hid_flags, int_f *h5f_flags,
- int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
- int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
- hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
- hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags);
+ int_f *h5fd_flags, hid_t_f *h5fd_hid_flags,
+ int_f *h5g_flags, int_f *h5i_flags, int_f *h5l_flags, int_f *h5o_flags,
+ hid_t_f *h5p_flags, int_f *h5p_flags_int, int_f *h5r_flags, int_f *h5s_flags,
+ hsize_t_f *h5s_hsize_flags, int_f *h5t_flags, int_f *h5z_flags, int_f *h5_generic_flags,
+ haddr_t_f *h5_haddr_generic_flags);
H5_FCDLL int_f h5init1_flags_c(int_f *h5lib_flags);
H5_FCDLL int_f h5get_libversion_c(int_f *majnum, int_f *minnum, int_f *relnum);
H5_FCDLL int_f h5check_version_c(int_f *majnum, int_f *minnum, int_f *relnum);
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 734f46e..eb45f60 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -58,9 +58,8 @@ libhdf5_fortran_la_LIBADD=$(LIBHDF5)
DISTCLEANFILES=h5fc
# H5fortran_types.F90 and H5f90i.h are automatically generaed by
-# H5match_types, and must be cleaned explicitly. H5fort_type_defines.h
-# is generated by H5fortran_detect
-MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h H5fort_type_defines.h
+# H5match_types, and must be cleaned explicitly.
+MOSTLYCLEANFILES=H5fortran_types.F90 H5f90i_gen.h
# Fortran module files can have different extensions and different names
# (e.g., different capitalizations) on different platforms. Write rules
@@ -167,4 +166,4 @@ HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \
H5Off.lo H5Pff.lo H5Rff.lo \
H5Sff.lo H5Tff.lo H5Zff.lo H5_gen.lo
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index 7b218ca..1333262 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -35,6 +35,8 @@ H5A_mp_H5ACREATE_BY_NAME_F
H5A_mp_H5AEXISTS_F
H5A_mp_H5AEXISTS_BY_NAME_F
H5A_mp_H5AOPEN_BY_NAME_F
+H5A_mp_H5AWRITE_PTR
+H5A_mp_H5AREAD_PTR
H5A_mp_H5ARENAME_F
; H5D
H5D_mp_H5DCREATE_F
@@ -62,6 +64,7 @@ H5D_mp_H5DFILL_CHAR
H5D_mp_H5DFILL_INTEGER
H5D_mp_H5DGET_SPACE_STATUS_F
H5D_mp_H5DCREATE_ANON_F
+H5D_mp_H5DGET_OFFSET_F
H5D_mp_H5DGET_SPACE_F
H5D_mp_H5DGET_TYPE_F
H5D_mp_H5DSET_EXTENT_F
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
diff --git a/fortran/testpar/Makefile.am b/fortran/testpar/Makefile.am
index 517a3c8..380f475 100644
--- a/fortran/testpar/Makefile.am
+++ b/fortran/testpar/Makefile.am
@@ -50,4 +50,4 @@ LDADD=$(LIBH5FTEST) $(LIBH5TEST) $(LIBH5F) $(LIBHDF5)
# Mark this directory as part of the Fortran API
FORTRAN_API=yes
-include $(top_srcdir)/config/conclude.am
+include $(top_srcdir)/config/conclude_fc.am