summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5F.F90
diff options
context:
space:
mode:
authorhdftest <hdftest@hdfgroup.org>2018-06-16 22:47:39 (GMT)
committerhdftest <hdftest@hdfgroup.org>2018-06-16 22:47:39 (GMT)
commit67d6f8d405b16c99590f112f429a352157be3554 (patch)
tree63b704912ac2dd93fcbd8214050ec8b59c63707f /fortran/test/tH5F.F90
parentafe28b7607204a2e9e753bb663d09454057d8196 (diff)
parent87829e06189cd9b29583b5ca8065b52b1f4cd523 (diff)
downloadhdf5-67d6f8d405b16c99590f112f429a352157be3554.zip
hdf5-67d6f8d405b16c99590f112f429a352157be3554.tar.gz
hdf5-67d6f8d405b16c99590f112f429a352157be3554.tar.bz2
Merging in latest from upstream (HDFFV/hdf5:refs/heads/hdf5_1_10)
* commit '87829e06189cd9b29583b5ca8065b52b1f4cd523': (30 commits) HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly HDFFV-10405: Using h5fget_obj_count_f with a file id of H5F_OBJ_ALL_F does not work properly Cleaned up H5Fmount/unmount code. Normalization with vol_integration branch. Add fortran MPI to test and example Add mpi include folders for fortran C objects Normalization with the vol_integration branch. Fixed MANIFEST Fix usage of compression lib in shared tests Fix jni function call version Fix the error found after earlier checkin. H5O_info fixes for java and examples Added a RELASE.txt entry for HDFFV-10505. Changed 'deprecated' to indicate 'no longer supported' in the --enable-debug/production configure flags. (1) Made the change according to the pull request feedback. (2) Removed the performance test form test/th5o.c: will decide on what needs to be done to show speedup via HDFFV-10463. Normalize with vol_integration. Removed unused H5MF functions and updated FUNC_ENTER macros and naming in H5MFsection.c. Restored some unused #defines to the deprecated section of H5Dpublic.h. Changes made based on feedback from pull request #1039. ...
Diffstat (limited to 'fortran/test/tH5F.F90')
-rw-r--r--fortran/test/tH5F.F9076
1 files changed, 75 insertions, 1 deletions
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index d91ee9c..72920f2 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -103,6 +103,10 @@ CONTAINS
!
INTEGER :: i, j
+ !number of objects
+ INTEGER(SIZE_T) :: obj_count
+ INTEGER(HID_T) :: t1, t2, t3, t4
+
!
!data buffers
!
@@ -133,11 +137,51 @@ CONTAINS
CALL h5_fixname_f(filename2, fix_filename2, H5P_DEFAULT_F, error)
if(error .ne. 0) stop
+ ! Test object counts
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t1, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t2, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t3, error)
+ CALL check(" h5tcopy_f",error,total_error)
+ CALL h5tcopy_f(H5T_NATIVE_CHARACTER, t4, error)
+ CALL check(" h5tcopy_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.4)THEN
+ total_error = total_error + 1
+ ENDIF
+
!
!Create first file "mount1.h5" using default properties.
!
CALL h5fcreate_f(fix_filename1, H5F_ACC_TRUNC_F, file1_id, error)
- CALL check("h5fcreate_f",error,total_error)
+ CALL check("h5fcreate_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.5)THEN
+ total_error = total_error + 1
+ ENDIF
+
+ CALL h5tclose_f(t1, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t2, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t3, error)
+ CALL check("h5tclose_f",error,total_error)
+ CALL h5tclose_f(t4, error)
+ CALL check("h5tclose_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.1)THEN
+ total_error = total_error + 1
+ ENDIF
!
!Create group "/G" inside file "mount1.h5".
@@ -211,9 +255,23 @@ CONTAINS
!
CALL h5fopen_f (fix_filename1, H5F_ACC_RDWR_F, file1_id, error)
CALL check("hfopen_f",error,total_error)
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.1)THEN
+ total_error = total_error + 1
+ ENDIF
+
CALL h5fopen_f (fix_filename2, H5F_ACC_RDWR_F, file2_id, error)
CALL check("h5fopen_f",error,total_error)
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.2)THEN
+ total_error = total_error + 1
+ ENDIF
!
!mount the second file under the first file's "/G" group.
!
@@ -245,6 +303,7 @@ CONTAINS
do i = 1, NX
do j = 1, NY
IF (data_out(i,j) .NE. data_in(i, j)) THEN
+ total_error = total_error + 1
END IF
end do
end do
@@ -267,11 +326,26 @@ CONTAINS
!
!Close both files.
!
+
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.2)THEN
+ total_error = total_error + 1
+ ENDIF
+
CALL h5fclose_f(file1_id, error)
CALL check("h5fclose_f",error,total_error)
CALL h5fclose_f(file2_id, error)
CALL check("h5fclose_f",error,total_error)
+ CALL h5fget_obj_count_f(INT(H5F_OBJ_ALL_F,HID_T), H5F_OBJ_ALL_F, obj_count, error)
+ CALL check(" h5fget_obj_count_f",error,total_error)
+
+ IF(obj_count.NE.0)THEN
+ total_error = total_error + 1
+ ENDIF
+
if(cleanup) CALL h5_cleanup_f(filename1, H5P_DEFAULT_F, error)
CALL check("h5_cleanup_f", error, total_error)
if(cleanup) CALL h5_cleanup_f(filename2, H5P_DEFAULT_F, error)