summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt301
-rw-r--r--fortran/src/H5Ff.c34
-rw-r--r--fortran/src/H5Fff.F9039
-rw-r--r--fortran/src/H5Pff.F9099
-rw-r--r--fortran/src/H5Sf.c20
-rw-r--r--fortran/src/H5Sff.F9027
-rw-r--r--fortran/src/H5VLff.F90315
-rw-r--r--fortran/src/H5_f.c16
-rw-r--r--fortran/src/H5_ff.F9027
-rw-r--r--fortran/src/H5f90global.F9035
-rw-r--r--fortran/src/H5f90proto.h5
-rw-r--r--fortran/src/HDF5.F901
-rw-r--r--fortran/src/Makefile.am3
-rw-r--r--fortran/src/hdf5_fortrandll.def.in11
14 files changed, 767 insertions, 166 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index f71e820..b01e4d4 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -40,7 +40,7 @@ set (Fortran_COMPILER_ID CMAKE_Fortran_COMPILER_ID)
#-----------------------------------------------------------------------------
add_executable (H5_buildiface ${HDF5_F90_SRC_SOURCE_DIR}/H5_buildiface.F90)
-target_include_directories(H5_buildiface
+target_include_directories (H5_buildiface
PRIVATE
"${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR}"
)
@@ -69,24 +69,28 @@ if (BUILD_SHARED_LIBS)
file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/shared")
set (MODSH_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/shared/${HDF_CFG_BUILD_TYPE})
endif ()
-file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
-set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
+if (NOT ONLY_SHARED_LIBS)
+ file (MAKE_DIRECTORY "${HDF5_F90_BINARY_DIR}/static")
+ set (MOD_BUILD_DIR ${CMAKE_Fortran_MODULE_DIRECTORY}/static/${HDF_CFG_BUILD_TYPE})
+endif ()
#-----------------------------------------------------------------------------
add_executable (H5match_types
${HDF5_F90_BINARY_DIR}/H5fort_type_defines.h
${HDF5_F90_SRC_SOURCE_DIR}/H5match_types.c
)
-target_include_directories(H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
-add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
- COMMAND $<TARGET_FILE:H5match_types>
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS H5match_types
-)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
+target_include_directories (H5match_types PRIVATE "${HDF5_BINARY_DIR};${HDF5_SRC_DIR};${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
+if (NOT ONLY_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
+ COMMAND $<TARGET_FILE:H5match_types>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
+ DEPENDS H5match_types
+ )
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5f90i_gen.h PROPERTIES GENERATED TRUE)
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90 PROPERTIES GENERATED TRUE)
+endif ()
if (BUILD_SHARED_LIBS)
add_custom_command (
OUTPUT ${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
@@ -131,24 +135,26 @@ set (f90CStub_C_SHHDRS
${HDF5_F90_BINARY_DIR}/shared/H5f90i_gen.h
)
-add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
-target_include_directories(${HDF5_F90_C_LIB_TARGET}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
- INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC)
-target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
-H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
-set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
- FOLDER libraries/fortran
- LINKER_LANGUAGE C
-)
-set (install_targets ${HDF5_F90_C_LIB_TARGET})
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_F90_C_LIB_TARGET} STATIC ${f90CStub_C_SOURCES} ${f90CStub_C_HDRS})
+ target_include_directories (${HDF5_F90_C_LIB_TARGET}
+ PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/static;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
+ INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ TARGET_C_PROPERTIES (${HDF5_F90_C_LIB_TARGET} STATIC)
+ target_link_libraries (${HDF5_F90_C_LIB_TARGET} PUBLIC ${HDF5_LIB_TARGET})
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_C_LIB_TARGET}")
+ H5_SET_LIB_OPTIONS (${HDF5_F90_C_LIB_TARGET} ${HDF5_F90_C_LIB_NAME} STATIC 0)
+ set_target_properties (${HDF5_F90_C_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ LINKER_LANGUAGE C
+ )
+ set (install_targets ${HDF5_F90_C_LIB_TARGET})
+endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_C_LIBSH_TARGET} SHARED ${f90CStub_C_SOURCES} ${f90CStub_C_SHHDRS})
- target_include_directories(${HDF5_F90_C_LIBSH_TARGET}
+ target_include_directories (${HDF5_F90_C_LIBSH_TARGET}
PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared;$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>"
INTERFACE "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
)
@@ -174,17 +180,19 @@ set (f90_F_GEN_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Dff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Pff.F90
)
-add_custom_command (
- OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
- COMMAND $<TARGET_FILE:H5_buildiface>
- WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
- DEPENDS ${f90_F_GEN_SOURCES}
- COMMENT "Generating the H5_gen.F90 file"
-)
-add_custom_target (H5gen ALL
- DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
-)
-set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE)
+if (NOT ONLY_SHARED_LIBS)
+ add_custom_command (
+ OUTPUT ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
+ COMMAND $<TARGET_FILE:H5_buildiface>
+ WORKING_DIRECTORY ${HDF5_F90_BINARY_DIR}/static
+ DEPENDS ${f90_F_GEN_SOURCES}
+ COMMENT "Generating the H5_gen.F90 file"
+ )
+ add_custom_target (H5gen ALL
+ DEPENDS ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
+ )
+ set_source_files_properties (${HDF5_F90_BINARY_DIR}/static/H5_gen.F90 PROPERTIES GENERATED TRUE)
+endif ()
if (BUILD_SHARED_LIBS)
add_custom_command (
@@ -217,21 +225,24 @@ set (f90_F_BASE_SOURCES
${HDF5_F90_SRC_SOURCE_DIR}/H5Rff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Sff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Tff.F90
+ ${HDF5_F90_SRC_SOURCE_DIR}/H5VLff.F90
${HDF5_F90_SRC_SOURCE_DIR}/H5Zff.F90
)
-set (f90_F_SOURCES
- # generated file
- ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
+if (NOT ONLY_SHARED_LIBS)
+ set (f90_F_SOURCES
+ # generated file
+ ${HDF5_F90_BINARY_DIR}/static/H5fortran_types.F90
- ${f90_F_BASE_SOURCES}
+ ${f90_F_BASE_SOURCES}
- # generated file
- ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
+ # generated file
+ ${HDF5_F90_BINARY_DIR}/static/H5_gen.F90
- # normal distribution
- ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90
-)
+ # normal distribution
+ ${HDF5_F90_SRC_SOURCE_DIR}/HDF5.F90
+ )
+endif ()
if (BUILD_SHARED_LIBS)
set (f90_F_SOURCES_SHARED
# generated file
@@ -250,43 +261,45 @@ endif ()
#-----------------------------------------------------------------------------
# Add Main fortran library
#-----------------------------------------------------------------------------
-add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES})
-target_include_directories (${HDF5_F90_LIB_TARGET}
- PRIVATE
- "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
- INTERFACE
- "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
-)
-target_compile_definitions(${HDF5_F90_LIB_TARGET}
- PRIVATE
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
- $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
-)
-target_link_libraries (${HDF5_F90_LIB_TARGET}
- PUBLIC
- ${HDF5_F90_C_LIB_TARGET}
- PRIVATE
- ${LINK_Fortran_LIBS}
- $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
-)
-#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
-#)
-#set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
-# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
-#)
-if(MSVC)
- set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
-endif()
-set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
- FOLDER libraries/fortran
- LINKER_LANGUAGE Fortran
- Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
-)
-H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
-set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
-set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
-add_dependencies(${HDF5_F90_LIB_TARGET} H5gen)
+if (NOT ONLY_SHARED_LIBS)
+ add_library (${HDF5_F90_LIB_TARGET} STATIC ${f90_F_SOURCES})
+ target_include_directories (${HDF5_F90_LIB_TARGET}
+ PRIVATE
+ "${HDF5_F90_SRC_SOURCE_DIR};${CMAKE_Fortran_MODULE_DIRECTORY}/static;${HDF5_F90_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_INCLUDE_DIRS}>"
+ INTERFACE
+ "$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>"
+ )
+ target_compile_definitions(${HDF5_F90_LIB_TARGET}
+ PRIVATE
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:HDF5F90_WINDOWS>
+ $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_COMPILE_FLAGS}>
+ )
+ target_link_libraries (${HDF5_F90_LIB_TARGET}
+ PUBLIC
+ ${HDF5_F90_C_LIB_TARGET}
+ PRIVATE
+ ${LINK_Fortran_LIBS}
+ $<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_Fortran_LIBRARIES}>
+ )
+# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:"-SUBSYSTEM:CONSOLE">
+# )
+# set_property(TARGET ${HDF5_F90_LIB_TARGET} APPEND PROPERTY
+# LINK_FLAGS $<$<STREQUAL:"x${CMAKE_Fortran_SIMULATE_ID}","xMSVC">:${WIN_LINK_FLAGS}>
+# )
+ if(MSVC)
+ set_property(TARGET ${HDF5_F90_LIB_TARGET} PROPERTY LINK_FLAGS "/SUBSYSTEM:CONSOLE ${WIN_LINK_FLAGS}")
+ endif()
+ set_target_properties (${HDF5_F90_LIB_TARGET} PROPERTIES
+ FOLDER libraries/fortran
+ LINKER_LANGUAGE Fortran
+ Fortran_MODULE_DIRECTORY ${CMAKE_Fortran_MODULE_DIRECTORY}/static
+ )
+ H5_SET_LIB_OPTIONS (${HDF5_F90_LIB_TARGET} ${HDF5_F90_LIB_NAME} STATIC 0)
+ set_global_variable (HDF5_LIBRARIES_TO_EXPORT "${HDF5_LIBRARIES_TO_EXPORT};${HDF5_F90_LIB_TARGET}")
+ set (install_targets ${install_targets} ${HDF5_F90_LIB_TARGET})
+ add_dependencies(${HDF5_F90_LIB_TARGET} H5gen)
+endif ()
if (BUILD_SHARED_LIBS)
add_library (${HDF5_F90_LIBSH_TARGET} SHARED ${f90_F_SOURCES_SHARED})
@@ -351,35 +364,38 @@ install (
fortheaders
)
-set (mod_files
- ${MOD_BUILD_DIR}/h5fortran_types.mod
- ${MOD_BUILD_DIR}/hdf5.mod
- ${MOD_BUILD_DIR}/h5fortkit.mod
- ${MOD_BUILD_DIR}/h5global.mod
- ${MOD_BUILD_DIR}/h5a.mod
- ${MOD_BUILD_DIR}/h5d.mod
- ${MOD_BUILD_DIR}/h5e.mod
- ${MOD_BUILD_DIR}/h5f.mod
- ${MOD_BUILD_DIR}/h5g.mod
- ${MOD_BUILD_DIR}/h5i.mod
- ${MOD_BUILD_DIR}/h5l.mod
- ${MOD_BUILD_DIR}/h5lib.mod
- ${MOD_BUILD_DIR}/h5o.mod
- ${MOD_BUILD_DIR}/h5p.mod
- ${MOD_BUILD_DIR}/h5r.mod
- ${MOD_BUILD_DIR}/h5s.mod
- ${MOD_BUILD_DIR}/h5t.mod
- ${MOD_BUILD_DIR}/h5z.mod
- ${MOD_BUILD_DIR}/h5_gen.mod
-)
-install (
- FILES
- ${mod_files}
- DESTINATION
- ${HDF5_INSTALL_INCLUDE_DIR}/static
- COMPONENT
- fortheaders
-)
+if (NOT ONLY_SHARED_LIBS)
+ set (mod_files
+ ${MOD_BUILD_DIR}/h5fortran_types.mod
+ ${MOD_BUILD_DIR}/hdf5.mod
+ ${MOD_BUILD_DIR}/h5fortkit.mod
+ ${MOD_BUILD_DIR}/h5global.mod
+ ${MOD_BUILD_DIR}/h5a.mod
+ ${MOD_BUILD_DIR}/h5d.mod
+ ${MOD_BUILD_DIR}/h5e.mod
+ ${MOD_BUILD_DIR}/h5f.mod
+ ${MOD_BUILD_DIR}/h5g.mod
+ ${MOD_BUILD_DIR}/h5i.mod
+ ${MOD_BUILD_DIR}/h5l.mod
+ ${MOD_BUILD_DIR}/h5lib.mod
+ ${MOD_BUILD_DIR}/h5o.mod
+ ${MOD_BUILD_DIR}/h5p.mod
+ ${MOD_BUILD_DIR}/h5r.mod
+ ${MOD_BUILD_DIR}/h5s.mod
+ ${MOD_BUILD_DIR}/h5t.mod
+ ${MOD_BUILD_DIR}/h5vl.mod
+ ${MOD_BUILD_DIR}/h5z.mod
+ ${MOD_BUILD_DIR}/h5_gen.mod
+ )
+ install (
+ FILES
+ ${mod_files}
+ DESTINATION
+ ${HDF5_INSTALL_INCLUDE_DIR}/static
+ COMPONENT
+ fortheaders
+ )
+endif ()
if (BUILD_SHARED_LIBS)
set (modsh_files
@@ -400,6 +416,7 @@ if (BUILD_SHARED_LIBS)
${MODSH_BUILD_DIR}/h5r.mod
${MODSH_BUILD_DIR}/h5s.mod
${MODSH_BUILD_DIR}/h5t.mod
+ ${MODSH_BUILD_DIR}/h5vl.mod
${MODSH_BUILD_DIR}/h5z.mod
${MODSH_BUILD_DIR}/h5_gen.mod
)
@@ -421,8 +438,10 @@ if (HDF5_EXPORTED_TARGETS)
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 ()
- INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
- #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ if (NOT ONLY_SHARED_LIBS)
+ INSTALL_TARGET_PDB (${HDF5_F90_C_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ #INSTALL_TARGET_PDB (${HDF5_F90_LIB_TARGET} ${HDF5_INSTALL_BIN_DIR} fortlibraries)
+ endif ()
install (
TARGETS
@@ -436,3 +455,53 @@ if (HDF5_EXPORTED_TARGETS)
INCLUDES DESTINATION include
)
endif ()
+
+#-----------------------------------------------------------------------------
+# Create pkgconfig files
+#-----------------------------------------------------------------------------
+set (_PKG_CONFIG_PREFIX ${CMAKE_INSTALL_PREFIX})
+set (_PKG_CONFIG_EXEC_PREFIX \${prefix})
+set (_PKG_CONFIG_LIBDIR \${exec_prefix}/lib)
+set (_PKG_CONFIG_INCLUDEDIR \${prefix}/include)
+set (_PKG_CONFIG_LIBNAME "${HDF5_F90_LIB_CORENAME}")
+set (_PKG_CONFIG_VERSION "${HDF5_PACKAGE_VERSION}")
+
+set (_PKG_CONFIG_LIBS_PRIVATE)
+
+if (NOT ONLY_SHARED_LIBS)
+ set (_PKG_CONFIG_LIBS "${_PKG_CONFIG_LIBS} -l${HDF5_F90_LIB_CORENAME}")
+endif ()
+if (BUILD_SHARED_LIBS)
+ set (_PKG_CONFIG_SH_LIBS "${_PKG_CONFIG_SH_LIBS} -l${HDF5_F90_LIB_CORENAME}")
+endif ()
+
+set (_PKG_CONFIG_REQUIRES "${HDF5_LIB_CORENAME}")
+set (_PKG_CONFIG_REQUIRES_PRIVATE "${HDF5_LIB_CORENAME}")
+
+configure_file (
+ ${HDF_RESOURCES_DIR}/libhdf5.pc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ @ONLY
+)
+install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/${HDF5_F90_LIB_CORENAME}-${HDF5_PACKAGE_VERSION}.pc
+ DESTINATION ${HDF5_INSTALL_LIB_DIR}/pkgconfig
+ COMPONENT fortlibraries
+)
+
+if (NOT WIN32)
+ set (_PKG_CONFIG_COMPILER ${CMAKE_Fortran_COMPILER})
+ configure_file (
+ ${HDF_RESOURCES_DIR}/libh5cc.in
+ ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ @ONLY
+ )
+ install (
+ FILES ${HDF5_BINARY_DIR}/CMakeFiles/h5fc
+ DESTINATION ${HDF5_INSTALL_BIN_DIR}
+ PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE
+ COMPONENT fortlibraries
+ )
+endif ()
+
+
diff --git a/fortran/src/H5Ff.c b/fortran/src/H5Ff.c
index a4e786e..12fb7ed 100644
--- a/fortran/src/H5Ff.c
+++ b/fortran/src/H5Ff.c
@@ -632,6 +632,40 @@ done:
return ret_value;
}
+/****if* H5Ff/h5fget_fileno_c
+ * NAME
+ * h5fget_fileno_c
+ * PURPOSE
+ * Call H5Fget_fileno to get file number
+ * INPUTS
+ * file_id - file identifier
+ * OUTPUTS
+ * fileno - file number for open file
+ * RETURNS
+ * 0 on success, -1 on failure
+ * AUTHOR
+ * Quincey Koziol
+ * Saturday, April 13, 2019
+ * SOURCE
+*/
+int_f
+h5fget_fileno_c(hid_t_f *file_id, int_f *fileno)
+/******/
+{
+ unsigned long fileno_c;
+ herr_t ret_value=0; /* Return value */
+
+ /*
+ * Call H5Fget_filesize function
+ */
+ if ((ret_value = H5Fget_fileno((hid_t)*file_id, &fileno_c)) < 0)
+ HGOTO_DONE(FAIL);
+ *fileno = (hsize_t_f)fileno_c;
+
+done:
+ return ret_value;
+}
+
/****if* H5Ff/h5fget_file_image_c
* NAME
* h5fget_file_image_c
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index cc51f37..8574c06 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -591,7 +591,6 @@ CONTAINS
! is an HDF5 file
INTEGER, INTENT(OUT) :: hdferr ! Error code
!*****
- INTEGER(HID_T) :: access_prp_default
CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
INTEGER(C_INT) :: flag ! "TRUE/FALSE/ERROR" flag from C routine
! to define status value.
@@ -886,6 +885,44 @@ CONTAINS
hdferr = h5fget_filesize_c(file_id, size)
END SUBROUTINE h5fget_filesize_f
+!****s* H5F/h5fget_fileno_f
+!
+! NAME
+! h5fget_fileno_f
+!
+! PURPOSE
+! Retrieves the file number of the HDF5 file.
+!
+! INPUTS
+! file_id - file identifier
+! OUTPUTS
+! fileno - file number
+! hdferr - Returns 0 if successful and -1 if fails
+!
+! AUTHOR
+! Quincey Koziol
+! April 13, 2019
+!
+! SOURCE
+ SUBROUTINE h5fget_fileno_f(file_id, fileno, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: file_id ! file identifier
+ INTEGER, INTENT(OUT) :: fileno ! File number
+ INTEGER, INTENT(OUT) :: hdferr ! Error code: 0 on success,
+ ! -1 if fail
+!*****
+ INTERFACE
+ INTEGER FUNCTION h5fget_fileno_c(file_id, fileno) &
+ BIND(C,NAME='h5fget_fileno_c')
+ IMPORT :: HID_T, HSIZE_T
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: file_id
+ INTEGER, INTENT(OUT) :: fileno
+ END FUNCTION h5fget_fileno_c
+ END INTERFACE
+ hdferr = h5fget_fileno_c(file_id, fileno)
+ END SUBROUTINE h5fget_fileno_f
+
!****s* H5F (F03)/h5fget_file_image_f_F03
!
! NAME
diff --git a/fortran/src/H5Pff.F90 b/fortran/src/H5Pff.F90
index 13a2953..0c0500d 100644
--- a/fortran/src/H5Pff.F90
+++ b/fortran/src/H5Pff.F90
@@ -9,7 +9,7 @@
! COPYRIGHT
! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
! Copyright by The HDF Group. *
-! Copyright by the Board of Trustees of the University of Illinois. *S
+! Copyright by the Board of Trustees of the University of Illinois. *
! All rights reserved. *
! *
! This file is part of HDF5. The full HDF5 copyright notice, including *
@@ -7929,7 +7929,7 @@ SUBROUTINE h5pget_virtual_filename_f(dcpl_id, index, name, hdferr, name_len)
INTERFACE
INTEGER(SIZE_T) FUNCTION h5pget_virtual_filename(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_filename')
- IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
+ IMPORT :: HID_T, SIZE_T, C_PTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
INTEGER(SIZE_T), INTENT(IN), VALUE :: index
@@ -7997,7 +7997,7 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
INTERFACE
INTEGER(SIZE_T) FUNCTION h5pget_virtual_dsetname(dcpl_id, index, name, size) BIND(C, NAME='H5Pget_virtual_dsetname')
- IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
+ IMPORT :: HID_T, SIZE_T, C_PTR
IMPLICIT NONE
INTEGER(HID_T) , INTENT(IN), VALUE :: dcpl_id
INTEGER(SIZE_T), INTENT(IN), VALUE :: index
@@ -8018,7 +8018,6 @@ SUBROUTINE h5pget_virtual_dsetname_f(dcpl_id, index, name, hdferr, name_len)
ELSE
CALL HD5c2fstring(name,c_name,LEN(name))
ENDIF
-
ENDIF
END SUBROUTINE h5pget_virtual_dsetname_f
@@ -8115,5 +8114,97 @@ END SUBROUTINE h5pget_virtual_dsetname_f
END SUBROUTINE h5pset_dset_no_attrs_hint_f
+!****s* H5P/H5Pset_vol_f
+!
+! NAME
+! H5Pset_vol_f
+!
+! PURPOSE
+! Set the file VOL connector (VOL_ID) for a file access
+! property list (PLIST_ID)
+! INPUTS
+! plist_id - access property list identifier.
+! new_vol_id - VOL connector id.
+!
+! OUTPUTS
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! OPTIONAL
+! new_vol_info - VOL connector info.
+!
+! AUTHOR
+! M.S. Breitenfeld
+! May 2019
+!
+! Fortran Interface:
+ SUBROUTINE h5pset_vol_f(plist_id, new_vol_id, hdferr, new_vol_info)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER(HID_T) , INTENT(IN) :: new_vol_id
+ INTEGER , INTENT(OUT) :: hdferr
+ TYPE(C_PTR) , OPTIONAL :: new_vol_info
+!*****
+
+ TYPE(C_PTR) :: new_vol_info_default
+
+ INTERFACE
+ INTEGER FUNCTION h5pset_vol(plist_id, new_vol_id, new_vol_info) BIND(C, NAME='H5Pset_vol')
+ IMPORT :: HID_T, C_PTR
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
+ INTEGER(HID_T), INTENT(IN), VALUE :: new_vol_id
+ TYPE(C_PTR) , INTENT(IN), VALUE :: new_vol_info
+ END FUNCTION h5pset_vol
+ END INTERFACE
+
+ new_vol_info_default = C_NULL_PTR
+ IF(PRESENT(new_vol_info)) new_vol_info_default=new_vol_info
+
+ hdferr = INT(h5pset_vol(plist_id, new_vol_id, new_vol_info_default))
+
+ END SUBROUTINE h5pset_vol_f
+
+!****s* H5P/H5Pget_vol_id_f
+!
+! NAME
+! H5Pget_vol_id_f
+!
+! PURPOSE
+! Get the file VOL connector (VOL_ID) for a file access
+! property list (PLIST_ID)
+! INPUTS
+! plist_id - access property list identifier.
+!
+! OUTPUTS
+! vol_id - VOL connector id.
+! hdferr - error code:
+! 0 on success and -1 on failure
+!
+! AUTHOR
+! M.S. Breitenfeld
+! May 2019
+!
+! Fortran Interface:
+ SUBROUTINE h5pget_vol_id_f(plist_id, vol_id, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN) :: plist_id
+ INTEGER(HID_T) , INTENT(OUT) :: vol_id
+ INTEGER , INTENT(OUT) :: hdferr
+!*****
+
+ INTERFACE
+ INTEGER FUNCTION h5pget_vol_id(plist_id, vol_id) BIND(C, NAME='H5Pget_vol_id')
+ IMPORT :: HID_T, C_PTR
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN), VALUE :: plist_id
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ END FUNCTION h5pget_vol_id
+ END INTERFACE
+
+ hdferr = INT(h5pget_vol_id(plist_id, vol_id))
+
+ END SUBROUTINE h5pget_vol_id_f
+
END MODULE H5P
diff --git a/fortran/src/H5Sf.c b/fortran/src/H5Sf.c
index 2eae0d9..1031914 100644
--- a/fortran/src/H5Sf.c
+++ b/fortran/src/H5Sf.c
@@ -994,8 +994,6 @@ done:
return ret_value;
}
-
-#ifdef NEW_HYPERSLAB_API
/****if* H5Sf/h5scombine_hyperslab_c
* NAME
* h5scombine_hyperslab_c
@@ -1119,11 +1117,11 @@ h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_
ret_value = 0;
return ret_value;
}
-/****if* H5Sf/h5sselect_select_c
+/****if* H5Sf/h5smodify_select_c
* NAME
- * h5sselect_select_c
+ * h5smodify_select_c
* PURPOSE
- * Call H5Sselect_ select
+ * Call H5Smodify_select
* INPUTS
* space1_id - identifier of the first dataspace to modify
* operator - defines how the new selection is combined
@@ -1139,7 +1137,7 @@ h5scombine_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_
*/
int_f
-h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
+h5smodify_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
/******/
{
int ret_value = -1;
@@ -1151,11 +1149,11 @@ h5sselect_select_c ( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id)
c_space1_id = (hid_t)*space1_id;
c_space2_id = (hid_t)*space2_id;
- if( H5Sselect_select(c_space1_id, c_op, c_space2_id)< 0) return ret_value;
+ if( H5Smodify_select(c_space1_id, c_op, c_space2_id)< 0) return ret_value;
ret_value = 0;
return ret_value;
}
-#endif /*NEW_HYPERSLAB_API*/
+
/****if* H5Sf/h5sget_select_type_c
* NAME
* h5sget_select_type_c
@@ -1310,7 +1308,7 @@ h5sdecode_c ( _fcd buf, hid_t_f *obj_id )
*/
int_f
-h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
+h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id )
/******/
{
int ret_value = -1;
@@ -1323,7 +1321,7 @@ h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
if (*nalloc == 0) {
- if(H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0)
+ if(H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0)
return ret_value;
*nalloc = (size_t_f)c_size;
@@ -1341,7 +1339,7 @@ h5sencode_c (_fcd buf, hid_t_f *obj_id, size_t_f *nalloc )
/*
* Call H5Sencode function.
*/
- if(H5Sencode((hid_t)*obj_id, c_buf, &c_size) < 0){
+ if(H5Sencode2((hid_t)*obj_id, c_buf, &c_size, (hid_t)*fapl_id) < 0){
return ret_value;
}
diff --git a/fortran/src/H5Sff.F90 b/fortran/src/H5Sff.F90
index 3434fba..e6f8e4c 100644
--- a/fortran/src/H5Sff.F90
+++ b/fortran/src/H5Sff.F90
@@ -1506,7 +1506,7 @@ CONTAINS
! !$!****s* H5S/
! !$!
! !$! NAME
-! !$! h5sselect_select_f
+! !$! h5smodify_select_f
! !$!
! !$! PURPOSE
! !$! Refine a hyperslab selection with an operation
@@ -1543,7 +1543,7 @@ CONTAINS
! !$!
! ! SOURCE
-! SUBROUTINE h5sselect_select_f(space1_id, operator, space2_id, &
+! SUBROUTINE h5smodify_select_f(space1_id, operator, space2_id, &
! hdferr)
! IMPLICIT NONE
! INTEGER(HID_T), INTENT(INOUT) :: space1_id ! Dataspace identifier to
@@ -1563,22 +1563,22 @@ CONTAINS
! INTEGER, INTENT(OUT) :: hdferr ! Error code
! INTERFACE
-! INTEGER FUNCTION h5sselect_select_c(space1_id, operator, &
+! INTEGER FUNCTION h5smodify_select_c(space1_id, operator, &
! space2_id)
! USE H5GLOBAL
! !DEC$IF DEFINED(HDF5F90_WINDOWS)
-! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SSELECT_SELECT_C'::h5sselect_select_c
+! !DEC$ATTRIBUTES C,reference,decorate,alias:'H5SMODIFY_SELECT_C'::h5smodify_select_c
! !DEC$ENDIF
! INTEGER(HID_T), INTENT(INOUT) :: space1_id
! INTEGER(HID_T), INTENT(IN) :: space2_id
! INTEGER, INTENT(IN) :: operator
-! END FUNCTION h5sselect_select_c
+! END FUNCTION h5smodify_select_c
! END INTERFACE
-! hdferr = h5sselect_select_c(space1_id, operator, space2_id)
+! hdferr = h5smodify_select_c(space1_id, operator, space2_id)
! return
-! END SUBROUTINE h5sselect_select_f
+! END SUBROUTINE h5smodify_select_f
!
!****s* H5S/h5sget_select_type_f
@@ -1683,25 +1683,32 @@ CONTAINS
! M. Scot Breitenfeld
! March 26, 2008
! SOURCE
- SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr)
+ SUBROUTINE h5sencode_f(obj_id, buf, nalloc, hdferr, fapl_id)
IMPLICIT NONE
INTEGER(HID_T), INTENT(IN) :: obj_id
CHARACTER(LEN=*), INTENT(OUT) :: buf
INTEGER(SIZE_T), INTENT(INOUT) :: nalloc
INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: fapl_id ! File access property list
!*****
+ INTEGER(HID_T) :: fapl_id_default
INTERFACE
- INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc) BIND(C,NAME='h5sencode_c')
+ INTEGER FUNCTION h5sencode_c(buf, obj_id, nalloc, fapl_id_default) BIND(C,NAME='h5sencode_c')
IMPORT :: C_CHAR
IMPORT :: HID_T, SIZE_T
INTEGER(HID_T), INTENT(IN) :: obj_id
CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: buf
INTEGER(SIZE_T), INTENT(INOUT) :: nalloc
+ INTEGER(HID_T) :: fapl_id_default
END FUNCTION h5sencode_c
END INTERFACE
- hdferr = h5sencode_c(buf, obj_id, nalloc)
+ fapl_id_default = H5P_DEFAULT_F
+
+ IF(PRESENT(fapl_id)) fapl_id_default = fapl_id
+
+ hdferr = h5sencode_c(buf, obj_id, nalloc, fapl_id_default)
END SUBROUTINE h5sencode_f
diff --git a/fortran/src/H5VLff.F90 b/fortran/src/H5VLff.F90
new file mode 100644
index 0000000..e21f38f
--- /dev/null
+++ b/fortran/src/H5VLff.F90
@@ -0,0 +1,315 @@
+!****h* ROBODoc/H5VL
+!
+! NAME
+! MODULE H5VL
+!
+! PURPOSE
+! This file contains Fortran interfaces for H5VL (VOL) functions.
+!
+! COPYRIGHT
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+! Copyright by The HDF Group. *
+! Copyright by the Board of Trustees of the University of Illinois. *
+! All rights reserved. *
+! *
+! This file is part of HDF5. The full HDF5 copyright notice, including *
+! terms governing use, modification, and redistribution, is contained in *
+! the COPYING file, which can be found at the root of the source code *
+! distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases. *
+! If you do not have access to either file, you may request a copy from *
+! help@hdfgroup.org. *
+! * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+!
+! NOTES
+! _____ __ __ _____ ____ _____ _______ _ _ _______
+! |_ _| \/ | __ \ / __ \| __ \__ __|/\ | \ | |__ __|
+! **** | | | \ / | |__) | | | | |__) | | | / \ | \| | | | ****
+! **** | | | |\/| | ___/| | | | _ / | | / /\ \ | . ` | | | ****
+! **** _| |_| | | | | | |__| | | \ \ | |/ ____ \| |\ | | | ****
+! |_____|_| |_|_| \____/|_| \_\ |_/_/ \_\_| \_| |_|
+!
+! If you add a new H5VL function you must add the function name to the
+! Windows dll file 'hdf5_fortrandll.def.in' in the fortran/src directory.
+! This is needed for Windows based operating systems.
+!
+!*****
+
+MODULE H5VL
+
+ USE, INTRINSIC :: ISO_C_BINDING, ONLY : C_PTR, C_FUNPTR, C_CHAR, C_INT64_T, C_INT
+ USE H5GLOBAL
+ USE H5fortkit
+
+ IMPLICIT NONE
+
+CONTAINS
+
+! H5VLregister_connector
+
+!
+!****s* H5VL/H5VLregister_connector_by_name_f
+!
+! NAME
+! H5VLregister_connector_by_name_f
+!
+! PURPOSE
+! Registers a new VOL connector as a member of the virtual object
+! layer class by name.
+!
+! INPUTS
+! name - Connector name
+! OUTPUTS
+! vol_id - VOL id
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLregister_connector_by_name_f(name, vol_id, hdferr, vipl_id)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(IN) :: name
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
+!*****
+ CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
+ INTEGER(HID_T) :: vipl_id_default
+
+ INTERFACE
+ INTEGER(HID_T) FUNCTION H5VLregister_connector_by_name(name, vipl_id) &
+ BIND(C,NAME='H5VLregister_connector_by_name')
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
+ INTEGER(HID_T), INTENT(IN), VALUE :: vipl_id
+ END FUNCTION H5VLregister_connector_by_name
+ END INTERFACE
+
+ vipl_id_default = H5P_DEFAULT_F
+ IF(PRESENT(vipl_id)) vipl_id_default = vipl_id
+
+ c_name = TRIM(name)//C_NULL_CHAR
+ vol_id = H5VLregister_connector_by_name(c_name, vipl_id_default)
+
+ hdferr = 0
+ IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F
+
+ END SUBROUTINE H5VLregister_connector_by_name_f
+
+ SUBROUTINE H5VLregister_connector_by_value_f(connector_value, vol_id, hdferr, vipl_id)
+ IMPLICIT NONE
+ INTEGER, INTENT(IN) :: connector_value
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(HID_T), OPTIONAL, INTENT(IN) :: vipl_id
+!*****
+ INTEGER(HID_T) :: vipl_id_default
+
+ INTERFACE
+ INTEGER(HID_T) FUNCTION H5VLregister_connector_by_value(connector_value, vipl_id) &
+ BIND(C,NAME='H5VLregister_connector_by_value')
+ IMPORT :: HID_T
+ IMPORT :: C_INT
+ INTEGER(C_INT), VALUE :: connector_value
+ INTEGER(HID_T), INTENT(IN), VALUE :: vipl_id
+ END FUNCTION H5VLregister_connector_by_value
+ END INTERFACE
+
+ vipl_id_default = H5P_DEFAULT_F
+ IF(PRESENT(vipl_id)) vipl_id_default = vipl_id
+
+ vol_id = H5VLregister_connector_by_value(INT(connector_value,C_INT), vipl_id_default)
+
+ hdferr = 0
+ IF(vol_id.LT.0) hdferr = H5I_INVALID_HID_F
+
+ END SUBROUTINE H5VLregister_connector_by_value_f
+
+!
+!****s* H5VL/H5VLis_connector_registered_f
+!
+! NAME
+! H5VLis_connector_registered_f
+!
+! PURPOSE
+! Tests whether a VOL class has been registered or not.
+!
+! INPUTS
+! name - Connector name
+! OUTPUTS
+! registered - state of VOL class registration
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLis_connector_registered_f(name, registered, hdferr)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(IN) :: name
+ LOGICAL, INTENT(OUT) :: registered
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
+ INTEGER(C_INT) :: registered_c
+
+ INTERFACE
+ INTEGER(C_INT) FUNCTION H5VLis_connector_registered(name) BIND(C,NAME='H5VLis_connector_registered')
+ IMPORT :: C_CHAR
+ IMPORT :: C_INT
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
+ END FUNCTION H5VLis_connector_registered
+ END INTERFACE
+
+ c_name = TRIM(name)//C_NULL_CHAR
+ registered_c = H5VLis_connector_registered(c_name)
+
+ hdferr = 0
+ registered = .FALSE.
+ IF(registered_c .GT. 0) registered = .TRUE.
+ IF(registered_c .LT. 0) hdferr = INT(registered_c)
+
+ END SUBROUTINE H5VLis_connector_registered_f
+
+!
+!****s* H5VL/H5VLis_connector_registered_f
+!
+! NAME
+! H5VLis_connector_registered_f
+!
+! PURPOSE
+! Retrieves the ID for a registered VOL connector.
+!
+! INPUTS
+! name - Connector name
+! OUTPUTS
+! vol_id - Connector id
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLget_connector_id_f(name, vol_id, hdferr)
+ IMPLICIT NONE
+ CHARACTER(LEN=*), INTENT(IN) :: name
+ INTEGER(HID_T), INTENT(OUT) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+ CHARACTER(LEN=LEN_TRIM(name)+1,KIND=C_CHAR) :: c_name
+
+ INTERFACE
+ INTEGER(HID_T) FUNCTION H5VLget_connector_id(name) BIND(C,NAME='H5VLget_connector_id')
+ IMPORT :: C_CHAR
+ IMPORT :: HID_T
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(IN) :: name
+ END FUNCTION H5VLget_connector_id
+ END INTERFACE
+
+ c_name = TRIM(name)//C_NULL_CHAR
+ vol_id = H5VLget_connector_id(c_name)
+
+ IF(vol_id.LT.0)THEN
+ hdferr = -1
+ vol_id = H5I_INVALID_HID_F
+ ENDIF
+
+ END SUBROUTINE H5VLget_connector_id_f
+
+ SUBROUTINE H5VLget_connector_name_f(obj_id, name, hdferr, name_len)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: obj_id
+ CHARACTER(LEN=*), INTENT(OUT) :: name
+ INTEGER, INTENT(OUT) :: hdferr
+ INTEGER(SIZE_T), OPTIONAL :: name_len
+!*****
+ CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:LEN(name)+1), TARGET :: c_name
+ INTEGER(SIZE_T) :: l
+
+ INTERFACE
+ INTEGER(SIZE_T) FUNCTION H5VLget_connector_name(obj_id, name, size) BIND(C,NAME='H5VLget_connector_name')
+ IMPORT :: HID_T, SIZE_T, C_PTR, C_CHAR
+ IMPLICIT NONE
+ INTEGER(HID_T) , INTENT(IN), VALUE :: obj_id
+ CHARACTER(KIND=C_CHAR), DIMENSION(*), INTENT(OUT) :: name
+ ! TYPE(C_PTR), value :: name
+ INTEGER(SIZE_T), INTENT(IN), VALUE :: size
+ END FUNCTION H5VLget_connector_name
+ END INTERFACE
+
+ hdferr = 0
+ IF(PRESENT(name_len))THEN
+ c_name(1:1)(1:1) = C_NULL_CHAR
+ name_len = INT(H5VLget_connector_name(obj_id, c_name, 1_SIZE_T), SIZE_T)
+ IF(name_len.LT.0) hdferr = H5I_INVALID_HID_F
+ ELSE
+ l = INT(LEN(name)+1,SIZE_T)
+ IF(INT(H5VLget_connector_name(obj_id, c_name, l), SIZE_T).LT.0)THEN
+ hdferr = H5I_INVALID_HID_F
+ ELSE
+ CALL HD5c2fstring(name,c_name,LEN(name))
+ ENDIF
+ ENDIF
+
+ END SUBROUTINE H5VLget_connector_name_f
+
+!
+!
+!****s* H5VL/H5VLclose_f
+!
+! NAME
+! H5VLclose_f
+!
+! PURPOSE
+! Closes a VOL connector ID.
+!
+! INPUTS
+! vol_id - A valid identifier of the connectory to unregister.
+!
+! OUTPUTS
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLclose_f(vol_id, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: vol_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+
+ INTERFACE
+ INTEGER FUNCTION H5VLclose(vol_id) BIND(C, NAME='H5VLclose')
+ IMPORT :: HID_T
+ INTEGER(HID_T), INTENT(IN), VALUE :: vol_id
+ END FUNCTION H5VLclose
+ END INTERFACE
+
+ hdferr = INT(H5VLclose(vol_id))
+
+ END SUBROUTINE H5VLclose_f
+
+!
+!****s* H5VL/H5VLunregister_connector_f
+!
+! NAME
+! H5VLunregister_connector_f
+!
+! PURPOSE
+! Removes a VOL connector ID from the library.
+!
+! INPUTS
+! plugin_id - A valid identifier of the connector to unregister.
+!
+! OUTPUTS
+! hdferr - Returns 0 if successful and -1 if fails
+! SOURCE
+
+ SUBROUTINE H5VLunregister_connector_f(plugin_id, hdferr)
+ IMPLICIT NONE
+ INTEGER(HID_T), INTENT(IN) :: plugin_id
+ INTEGER, INTENT(OUT) :: hdferr
+!*****
+
+ INTERFACE
+ INTEGER FUNCTION H5VLunregister_connector(plugin_id) BIND(C, NAME='H5VLunregister_connector')
+ IMPORT :: HID_T
+ INTEGER(HID_T), INTENT(IN), VALUE :: plugin_id
+ END FUNCTION H5VLunregister_connector
+ END INTERFACE
+
+ hdferr = INT(H5VLunregister_connector(plugin_id))
+
+ END SUBROUTINE H5VLunregister_connector_f
+
+END MODULE H5VL
diff --git a/fortran/src/H5_f.c b/fortran/src/H5_f.c
index 69ba8b3..2d1c6e7 100644
--- a/fortran/src/H5_f.c
+++ b/fortran/src/H5_f.c
@@ -498,6 +498,16 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5i_flags[4] = (int_f)H5I_DATASET;
h5i_flags[5] = (int_f)H5I_ATTR;
h5i_flags[6] = (int_f)H5I_BADID;
+ h5i_flags[7] = (int_f)H5I_UNINIT;
+ h5i_flags[8] = (int_f)H5I_VFL;
+ h5i_flags[9] = (int_f)H5I_VOL;
+ h5i_flags[10] = (int_f)H5I_GENPROP_CLS;
+ h5i_flags[11] = (int_f)H5I_GENPROP_LST;
+ h5i_flags[12] = (int_f)H5I_ERROR_CLASS;
+ h5i_flags[13] = (int_f)H5I_ERROR_MSG;
+ h5i_flags[14] = (int_f)H5I_ERROR_STACK;
+ h5i_flags[15] = (int_f)H5I_NTYPES;
+ h5i_flags[16] = (int_f)H5I_INVALID_HID;
/*
* H5L flags
*/
@@ -632,7 +642,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5s_flags[15] = (int_f)H5S_SEL_POINTS;
h5s_flags[16] = (int_f)H5S_SEL_HYPERSLABS;
h5s_flags[17] = (int_f)H5S_SEL_ALL;
-
/*
* H5T flags
*/
@@ -671,7 +680,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5t_flags[32] = (int_f)H5T_ARRAY;
h5t_flags[33] = (int_f)H5T_DIR_ASCEND;
h5t_flags[34] = (int_f)H5T_DIR_DESCEND;
-
/*
* H5Z flags
*/
@@ -695,10 +703,6 @@ h5init_flags_c( int_f *h5d_flags, size_t_f *h5d_size_flags,
h5z_flags[17] = (int_f)H5Z_SO_FLOAT_ESCALE;
h5z_flags[18] = (int_f)H5Z_SO_INT;
h5z_flags[19] = (int_f)H5Z_SO_INT_MINBITS_DEFAULT;
-/*
- * H5A flags
- */
-
/*
* H5 Generic flags introduced in version 1.8
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index 84529e4..443be79 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -88,7 +88,7 @@ MODULE H5LIB
!
! H5I flags declaration
!
- INTEGER, PARAMETER :: H5I_FLAGS_LEN = 7
+ INTEGER, PARAMETER :: H5I_FLAGS_LEN = 17
INTEGER, DIMENSION(1:H5I_FLAGS_LEN) :: H5I_flags
!
! H5L flags declaration
@@ -129,6 +129,7 @@ MODULE H5LIB
!
INTEGER, PARAMETER :: H5T_FLAGS_LEN = 35
INTEGER, DIMENSION(1:H5T_FLAGS_LEN) :: H5T_flags
+
!
! H5Z flags declaration
!
@@ -443,13 +444,23 @@ CONTAINS
!
! H5I flags declaration
!
- H5I_FILE_F = H5I_flags(1)
- H5I_GROUP_F = H5I_flags(2)
- H5I_DATATYPE_F = H5I_flags(3)
- H5I_DATASPACE_F = H5I_flags(4)
- H5I_DATASET_F = H5I_flags(5)
- H5I_ATTR_F = H5I_flags(6)
- H5I_BADID_F = H5I_flags(7)
+ H5I_FILE_F = H5I_flags(1)
+ H5I_GROUP_F = H5I_flags(2)
+ H5I_DATATYPE_F = H5I_flags(3)
+ H5I_DATASPACE_F = H5I_flags(4)
+ H5I_DATASET_F = H5I_flags(5)
+ H5I_ATTR_F = H5I_flags(6)
+ H5I_BADID_F = H5I_flags(7)
+ H5I_UNINIT_F = H5I_flags(8)
+ H5I_VFL_F = H5I_flags(9)
+ H5I_VOL_F = H5I_flags(10)
+ H5I_GENPROP_CLS_F = H5I_flags(11)
+ H5I_GENPROP_LST_F = H5I_flags(12)
+ H5I_ERROR_CLASS_F = H5I_flags(13)
+ H5I_ERROR_MSG_F = H5I_flags(14)
+ H5I_ERROR_STACK_F = H5I_flags(15)
+ H5I_NTYPES_F = H5I_flags(16)
+ H5I_INVALID_HID_F = H5I_flags(17)
!
! H5L flags
!
diff --git a/fortran/src/H5f90global.F90 b/fortran/src/H5f90global.F90
index b705cc1..02e3bc3 100644
--- a/fortran/src/H5f90global.F90
+++ b/fortran/src/H5f90global.F90
@@ -435,15 +435,36 @@ MODULE H5GLOBAL
!DEC$ATTRIBUTES DLLEXPORT :: H5I_DATASET_F
!DEC$ATTRIBUTES DLLEXPORT :: H5I_ATTR_F
!DEC$ATTRIBUTES DLLEXPORT :: H5I_BADID_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_UNINIT_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_VFL_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_VOL_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_GENPROP_CLS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_GENPROP_LST_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_CLASS_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_MSG_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_ERROR_STACK_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_NTYPES_F
+ !DEC$ATTRIBUTES DLLEXPORT :: H5I_INVALID_HID_F
!DEC$endif
- INTEGER :: H5I_FILE_F
- INTEGER :: H5I_GROUP_F
- INTEGER :: H5I_DATATYPE_F
- INTEGER :: H5I_DATASPACE_F
- INTEGER :: H5I_DATASET_F
- INTEGER :: H5I_ATTR_F
- INTEGER :: H5I_BADID_F
+ INTEGER :: H5I_FILE_F
+ INTEGER :: H5I_GROUP_F
+ INTEGER :: H5I_DATATYPE_F
+ INTEGER :: H5I_DATASPACE_F
+ INTEGER :: H5I_DATASET_F
+ INTEGER :: H5I_ATTR_F
+ INTEGER :: H5I_BADID_F
+ INTEGER :: H5I_UNINIT_F
+ INTEGER :: H5I_VFL_F
+ INTEGER :: H5I_VOL_F
+ INTEGER :: H5I_GENPROP_CLS_F
+ INTEGER :: H5I_GENPROP_LST_F
+ INTEGER :: H5I_ERROR_CLASS_F
+ INTEGER :: H5I_ERROR_MSG_F
+ INTEGER :: H5I_ERROR_STACK_F
+ INTEGER :: H5I_NTYPES_F
+ INTEGER :: H5I_INVALID_HID_F
+
!
! H5L flags declaration
!
diff --git a/fortran/src/H5f90proto.h b/fortran/src/H5f90proto.h
index 56b7f22..5faf4b4 100644
--- a/fortran/src/H5f90proto.h
+++ b/fortran/src/H5f90proto.h
@@ -91,6 +91,7 @@ H5_FCDLL int_f h5fget_file_image_c(hid_t_f *file_id, void *buf_ptr, size_t_f *bu
H5_FCDLL int_f h5fflush_c(hid_t_f *obj_id, int_f *scope);
H5_FCDLL int_f h5fget_name_c(hid_t_f *obj_id, size_t_f *size, _fcd buf, size_t_f *buflen);
H5_FCDLL int_f h5fget_filesize_c(hid_t_f *file_id, hsize_t_f *size);
+H5_FCDLL int_f h5fget_fileno_c(hid_t_f *file_id, int_f *fileno);
/*
* Functions from H5Sf.c
@@ -122,9 +123,9 @@ H5_FCDLL int_f h5sget_select_type_c( hid_t_f *space_id , int_f *op);
H5_FCDLL int_f h5sselect_elements_c( hid_t_f *space_id , int_f *op, size_t_f *nelements, hsize_t_f *coord);
H5_FCDLL int_f h5scombine_hyperslab_c( hid_t_f *space_id , int_f *op, hsize_t_f *start, hsize_t_f *count, hsize_t_f *stride, hsize_t_f *block, hid_t_f *hyper_id);
H5_FCDLL int_f h5scombine_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id, hid_t_f *ds_id);
-H5_FCDLL int_f h5sselect_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id);
+H5_FCDLL int_f h5smodify_select_c( hid_t_f *space1_id , int_f *op, hid_t_f *space2_id);
H5_FCDLL int_f h5sdecode_c( _fcd buf, hid_t_f *obj_id );
-H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc );
+H5_FCDLL int_f h5sencode_c(_fcd buf, hid_t_f *obj_id, size_t_f *nalloc, hid_t_f *fapl_id );
H5_FCDLL int_f h5sextent_equal_c( hid_t_f * space1_id, hid_t_f *space2_id, hid_t_f *c_equal);
/*
diff --git a/fortran/src/HDF5.F90 b/fortran/src/HDF5.F90
index 0370224..fe38b7d 100644
--- a/fortran/src/HDF5.F90
+++ b/fortran/src/HDF5.F90
@@ -38,6 +38,7 @@ MODULE HDF5
USE H5O
USE H5P
USE H5R
+ USE H5VL
USE H5Z
USE H5_gen
USE H5LIB
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index 666f6cb..4009439 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -44,7 +44,7 @@ endif
libhdf5_fortran_la_SOURCES=H5f90global.F90 \
H5fortran_types.F90 H5_ff.F90 H5Aff.F90 H5Dff.F90 H5Eff.F90 \
H5Fff.F90 H5Gff.F90 H5Iff.F90 H5Lff.F90 H5Off.F90 H5Pff.F90 H5Rff.F90 H5Sff.F90 \
- H5Tff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
+ H5Tff.F90 H5VLff.F90 H5Zff.F90 H5_gen.F90 H5fortkit.F90 \
H5f90kit.c H5_f.c H5Af.c H5Df.c H5Ef.c H5Ff.c H5Gf.c \
H5If.c H5Lf.c H5Of.c H5Pf.c H5Rf.c H5Sf.c H5Tf.c H5Zf.c HDF5.F90
@@ -155,6 +155,7 @@ H5Pff.lo: $(srcdir)/H5Pff.F90 H5f90global.lo H5fortkit.lo
H5Rff.lo: $(srcdir)/H5Rff.F90 H5f90global.lo
H5Sff.lo: $(srcdir)/H5Sff.F90 H5f90global.lo
H5Tff.lo: $(srcdir)/H5Tff.F90 H5f90global.lo
+H5VLff.lo: $(srcdir)/H5VLff.F90 H5f90global.lo
H5Zff.lo: $(srcdir)/H5Zff.F90 H5f90global.lo
H5_gen.lo: H5_gen.F90 H5f90global.lo H5Aff.lo H5Dff.lo H5Pff.lo
HDF5.lo: $(srcdir)/HDF5.F90 H5f90global.lo H5_ff.lo H5Aff.lo \
diff --git a/fortran/src/hdf5_fortrandll.def.in b/fortran/src/hdf5_fortrandll.def.in
index a99efad..e31a582 100644
--- a/fortran/src/hdf5_fortrandll.def.in
+++ b/fortran/src/hdf5_fortrandll.def.in
@@ -98,6 +98,7 @@ H5F_mp_H5FGET_ACCESS_PLIST_F
H5F_mp_H5FIS_ACCESSIBLE_F
H5F_mp_H5FIS_HDF5_F
H5F_mp_H5FGET_NAME_F
+H5F_mp_H5FGET_FILENO_F
H5F_mp_H5FGET_FILESIZE_F
H5F_mp_H5FGET_FILE_IMAGE_F
H5F_mp_H5FGET_DSET_NO_ATTRS_HINT_F
@@ -334,6 +335,8 @@ H5P_mp_H5PGET_VIRTUAL_FILENAME_F
H5P_mp_H5PGET_VIRTUAL_DSETNAME_F
H5P_mp_H5PGET_DSET_NO_ATTRS_HINT_F
H5P_mp_H5PSET_DSET_NO_ATTRS_HINT_F
+H5P_mp_H5PSET_VOL_F
+H5P_mp_H5PGET_VOL_ID_F
; Parallel
@H5_NOPAREXP@H5P_mp_H5PSET_FAPL_MPIO_F
@H5_NOPAREXP@H5P_mp_H5PGET_FAPL_MPIO_F
@@ -451,6 +454,14 @@ H5T_mp_H5TGET_NATIVE_TYPE_F
H5T_mp_H5TCONVERT_F
H5T_mp_H5TENUM_INSERT_F90
H5T_mp_H5TENUM_INSERT_F03
+; H5VL
+H5VL_mp_H5VLREGISTER_CONNECTOR_BY_NAME_F
+H5VL_mp_H5VLREGISTER_CONNECTOR_BY_VALUE_F
+H5VL_mp_H5VLIS_CONNECTOR_REGISTERED_F
+H5VL_mp_H5VLGET_CONNECTOR_ID_F
+H5VL_mp_H5VLGET_CONNECTOR_NAME_F
+H5VL_mp_H5VLCLOSE_F
+H5VL_mp_H5VLUNREGISTER_CONNECTOR_F
; H5Z
H5Z_mp_H5ZUNREGISTER_F
H5Z_mp_H5ZFILTER_AVAIL_F