summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-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
10 files changed, 70 insertions, 44 deletions
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