summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5F.F90
diff options
context:
space:
mode:
Diffstat (limited to 'fortran/test/tH5F.F90')
-rw-r--r--fortran/test/tH5F.F9029
1 files changed, 29 insertions, 0 deletions
diff --git a/fortran/test/tH5F.F90 b/fortran/test/tH5F.F90
index 2501996..b898c21 100644
--- a/fortran/test/tH5F.F90
+++ b/fortran/test/tH5F.F90
@@ -105,6 +105,10 @@ CONTAINS
INTEGER(SIZE_T) :: obj_count
INTEGER(HID_T) :: t1, t2, t3, t4
+ ! File numbers
+ INTEGER :: file_num1
+ INTEGER :: file_num2
+
!
!data buffers
!
@@ -287,6 +291,18 @@ CONTAINS
IF(obj_count.NE.2)THEN
total_error = total_error + 1
ENDIF
+
+ !
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file1_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(file2_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .EQ. file_num2) THEN
+ write(*,*) "file numbers aren't supposed to match"
+ END IF
+
!
!mount the second file under the first file's "/G" group.
!
@@ -431,6 +447,8 @@ CONTAINS
INTEGER, DIMENSION(4,6) :: dset_data, data_out
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
INTEGER(HSIZE_T) :: file_size
+ INTEGER :: file_num1
+ INTEGER :: file_num2
CHARACTER(LEN=80) :: file_name
INTEGER(SIZE_T) :: name_size
@@ -499,6 +517,17 @@ CONTAINS
CALL check("h5fget_filesize_f",error,total_error)
!
+ !Check file numbers
+ !
+ CALL h5fget_fileno_f(file_id, file_num1, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ CALL h5fget_fileno_f(reopen_id, file_num2, error)
+ CALL check("h5fget_fileno_f",error,total_error)
+ IF(file_num1 .NE. file_num2) THEN
+ write(*,*) "file numbers don't match"
+ END IF
+
+ !
!Open the dataset based on the reopen_id.
!
CALL h5dopen_f(reopen_id, dsetname, dset_id, error)