summaryrefslogtreecommitdiffstats
path: root/fortran/src
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/src')
-rw-r--r--fortran/src/CMakeLists.txt6
-rw-r--r--fortran/src/H5Af.c2
-rw-r--r--fortran/src/H5Fff.F9010
-rw-r--r--fortran/src/H5Gf.c2
-rw-r--r--fortran/src/H5Of.c18
-rw-r--r--fortran/src/H5_ff.F906
-rw-r--r--fortran/src/Makefile.am2
7 files changed, 30 insertions, 16 deletions
diff --git a/fortran/src/CMakeLists.txt b/fortran/src/CMakeLists.txt
index 5750d05..025fab5 100644
--- a/fortran/src/CMakeLists.txt
+++ b/fortran/src/CMakeLists.txt
@@ -81,7 +81,7 @@ 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}")
+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
@@ -137,7 +137,7 @@ set (f90CStub_C_SHHDRS
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"
+ 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)
@@ -153,7 +153,7 @@ set (install_targets ${HDF5_F90_C_LIB_TARGET})
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}
- PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};${HDF5_F90_BINARY_DIR};${HDF5_F90_BINARY_DIR}/shared"
+ 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>"
)
target_compile_definitions(${HDF5_F90_C_LIBSH_TARGET}
diff --git a/fortran/src/H5Af.c b/fortran/src/H5Af.c
index 23dd936..31a18fc 100644
--- a/fortran/src/H5Af.c
+++ b/fortran/src/H5Af.c
@@ -143,7 +143,7 @@ h5aget_num_attrs_c (hid_t_f *obj_id, int_f *attr_num)
/*
* Call H5Oget_info function.
*/
- if(H5Oget_info((hid_t)*obj_id, &oinfo) < 0)
+ if(H5Oget_info2((hid_t)*obj_id, &oinfo, H5O_INFO_NUM_ATTRS) < 0)
HGOTO_DONE(FAIL);
/* Set number of attributes */
diff --git a/fortran/src/H5Fff.F90 b/fortran/src/H5Fff.F90
index a3bef37..358e421 100644
--- a/fortran/src/H5Fff.F90
+++ b/fortran/src/H5Fff.F90
@@ -42,6 +42,9 @@ MODULE H5F
USE H5GLOBAL
IMPLICIT NONE
+ ! Number of objects opened in H5open_f
+ INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ
+
CONTAINS
!****s* H5F/h5fcreate_f
!
@@ -616,9 +619,14 @@ CONTAINS
INTEGER(SIZE_T), INTENT(OUT) :: obj_count
END FUNCTION h5fget_obj_count_c
END INTERFACE
-
+
hdferr = h5fget_obj_count_c(file_id, obj_type, obj_count)
+ ! Don't include objects created by H5open in the H5F_OBJ_ALL_F count
+ IF(file_id.EQ.INT(H5F_OBJ_ALL_F,HID_T))THEN
+ obj_count = obj_count - H5OPEN_NUM_OBJ
+ ENDIF
+
END SUBROUTINE h5fget_obj_count_f
!****s* H5F/h5fget_obj_ids_f
diff --git a/fortran/src/H5Gf.c b/fortran/src/H5Gf.c
index b829b20..def67e1 100644
--- a/fortran/src/H5Gf.c
+++ b/fortran/src/H5Gf.c
@@ -200,7 +200,7 @@ h5gget_obj_info_idx_c(hid_t_f *loc_id, _fcd name, int_f *namelen, int_f *idx,
/* Query the object's information */
if(H5Lget_name_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, c_obj_name, c_obj_namelen, H5P_DEFAULT) < 0)
goto DONE;
- if(H5Oget_info_by_idx(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5P_DEFAULT) < 0)
+ if(H5Oget_info_by_idx2(gid, ".", H5_INDEX_NAME, H5_ITER_INC, c_idx, &oinfo, H5O_INFO_BASIC, H5P_DEFAULT) < 0)
goto DONE;
/* XXX: Switch from using H5Gget_objtype_by_idx() means that this routine won't
diff --git a/fortran/src/H5Of.c b/fortran/src/H5Of.c
index 7d065a5..45b7f09 100644
--- a/fortran/src/H5Of.c
+++ b/fortran/src/H5Of.c
@@ -248,9 +248,9 @@ h5ovisit_c(hid_t_f *group_id, int_f *index_type, int_f *order, H5O_iterate_t op,
herr_t func_ret_value; /* H5Linterate return value */
/*
- * Call H5Ovisit
+ * Call H5Ovisit2
*/
- func_ret_value = H5Ovisit( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data);
+ func_ret_value = H5Ovisit2( (hid_t)*group_id, (H5_index_t)*index_type, (H5_iter_order_t)*order, op, op_data, H5O_INFO_ALL);
ret_value = (int_f)func_ret_value;
@@ -330,8 +330,8 @@ h5oget_info_by_name_c (hid_t_f *loc_id, _fcd name, size_t_f *namelen, hid_t_f *l
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info_by_name((hid_t)*loc_id, c_name,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ if(H5Oget_info_by_name2((hid_t)*loc_id, c_name,
+ &Oinfo, H5O_INFO_ALL, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -385,8 +385,8 @@ h5oget_info_by_idx_c (hid_t_f *loc_id, _fcd group_name, size_t_f *namelen,
/*
* Call H5Oinfo_by_idx function.
*/
- if(H5Oget_info_by_idx((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
- &Oinfo, (hid_t)*lapl_id) < 0)
+ if(H5Oget_info_by_idx2((hid_t)*loc_id, c_group_name, c_index_field, c_order, (hsize_t)*n,
+ &Oinfo, H5O_INFO_ALL, (hid_t)*lapl_id) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -424,7 +424,7 @@ h5oget_info_c (hid_t_f *object_id, H5O_info_t_f *object_info)
/*
* Call H5Oinfo_by_name function.
*/
- if(H5Oget_info((hid_t)*object_id, &Oinfo) < 0)
+ if(H5Oget_info2((hid_t)*object_id, &Oinfo, H5O_INFO_ALL) < 0)
HGOTO_DONE(FAIL);
ret_value = fill_h5o_info_t_f(Oinfo,object_info);
@@ -532,8 +532,8 @@ h5ovisit_by_name_c(hid_t_f *loc_id, _fcd object_name, size_t_f *namelen, int_f
/*
* Call H5Ovisit
*/
- func_ret_value = H5Ovisit_by_name( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
- op, op_data, (hid_t)*lapl_id);
+ func_ret_value = H5Ovisit_by_name2( (hid_t)*loc_id, c_object_name, (H5_index_t)*index_type, (H5_iter_order_t)*order,
+ op, op_data, H5O_INFO_ALL, (hid_t)*lapl_id);
ret_value = (int_f)func_ret_value;
done:
diff --git a/fortran/src/H5_ff.F90 b/fortran/src/H5_ff.F90
index db57f03..f63e734 100644
--- a/fortran/src/H5_ff.F90
+++ b/fortran/src/H5_ff.F90
@@ -169,8 +169,10 @@ CONTAINS
! October 13, 2011
! Fortran90 Interface:
SUBROUTINE h5open_f(error)
+ USE H5F, ONLY : h5fget_obj_count_f, H5OPEN_NUM_OBJ
IMPLICIT NONE
INTEGER, INTENT(OUT) :: error
+ INTEGER(SIZE_T) :: H5OPEN_NUM_OBJ_LOC = 0
!*****
INTERFACE
@@ -612,6 +614,10 @@ CONTAINS
H5_SZIP_EC_OM_F = H5LIB_flags(1)
H5_SZIP_NN_OM_F = H5LIB_flags(2)
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, H5OPEN_NUM_OBJ_LOC, error)
+
+ H5OPEN_NUM_OBJ = H5OPEN_NUM_OBJ_LOC
+
END SUBROUTINE h5open_f
!****s* H5LIB/h5close_f
diff --git a/fortran/src/Makefile.am b/fortran/src/Makefile.am
index a863a67..666f6cb 100644
--- a/fortran/src/Makefile.am
+++ b/fortran/src/Makefile.am
@@ -142,7 +142,7 @@ FORTRAN_API=yes
# modules they depend upon are actually made. *sigh*
H5f90global.lo: $(srcdir)/H5f90global.F90 H5fortran_types.lo
H5_buildiface.lo: $(srcdir)/H5_buildiface.F90
-H5_ff.lo: $(srcdir)/H5_ff.F90 H5f90global.lo
+H5_ff.lo: $(srcdir)/H5_ff.F90 H5Fff.lo H5f90global.lo
H5Aff.lo: $(srcdir)/H5Aff.F90 H5f90global.lo
H5Dff.lo: $(srcdir)/H5Dff.F90 H5f90global.lo
H5Eff.lo: $(srcdir)/H5Eff.F90 H5f90global.lo