summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5I.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2004-08-25 03:44:59 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2004-08-25 03:44:59 (GMT)
commit0a965d2236a811f66ff42df732031a150e1020ac (patch)
tree001765c51deca6aaac80cb48763a2d073869e43d /fortran/test/tH5I.f90
parent98623b2787525823f1020a291e534024cbbfe851 (diff)
downloadhdf5-0a965d2236a811f66ff42df732031a150e1020ac.zip
hdf5-0a965d2236a811f66ff42df732031a150e1020ac.tar.gz
hdf5-0a965d2236a811f66ff42df732031a150e1020ac.tar.bz2
[svn-r9154]
Purpose: Maintenance/bug fixes (OSF1 C++ and missing Fortran APIs) Description: bringing 1.6 changes to 1.7 Solution: Platforms tested: OSF1, Solaris 2.8, AIX5.1 Misc. update:
Diffstat (limited to 'fortran/test/tH5I.f90')
-rw-r--r--fortran/test/tH5I.f9019
1 files changed, 19 insertions, 0 deletions
diff --git a/fortran/test/tH5I.f90 b/fortran/test/tH5I.f90
index ee9942b..fb526e4 100644
--- a/fortran/test/tH5I.f90
+++ b/fortran/test/tH5I.f90
@@ -31,6 +31,7 @@
INTEGER(HID_T) :: file_id ! File identifier
+ INTEGER(HID_T) :: new_file_id ! File identifier
INTEGER(HID_T) :: group_id ! group identifier
INTEGER(HID_T) :: dset_id ! Dataset identifier
INTEGER(HID_T) :: dspace_id ! Dataspace identifier
@@ -52,6 +53,7 @@
INTEGER :: error ! Error flag
INTEGER(HSIZE_T), DIMENSION(2) :: data_dims
CHARACTER(LEN=80) name_buf
+ CHARACTER(LEN=280) name_buf1
INTEGER(SIZE_T) buf_size
INTEGER(SIZE_T) name_size
INTEGER :: ref_count ! Reference count for IDs
@@ -86,6 +88,9 @@
CALL h5dcreate_f(file_id, dsetname, H5T_NATIVE_INTEGER, dspace_id, &
dset_id, error)
CALL check("h5dcreate_f",error,total_error)
+ !
+ ! Get dataset name from dataset identifier
+ !
buf_size = 80
CALL h5iget_name_f(dset_id, name_buf, buf_size, name_size, error)
CALL check("h5iget_name_f",error,total_error)
@@ -98,6 +103,18 @@
total_error = total_error + 1
endif
endif
+ !
+ ! Get file identifier from dataset identifier and then get file name
+ !
+ CALL h5iget_file_id_f(dset_id, new_file_id, error)
+ CALL check("h5iget_file_id_f",error,total_error)
+ name_size = 80
+ CALL h5fget_name_f(new_file_id, name_buf1, name_size, error)
+ CALL check("h5fget_name_f",error,total_error)
+ if (name_buf1(1:name_size) .ne. fix_filename(1:name_size)) then
+ write(*,*) "h5fget_name returned wrong file name"
+ total_error = total_error + 1
+ endif
!
! Write data_in to the dataset
@@ -207,6 +224,8 @@
!
CALL h5fclose_f(file_id, error)
CALL check("h5fclose_f",error,total_error)
+ CALL h5fclose_f(new_file_id, error)
+ CALL check("h5fclose_f",error,total_error)
!
! Basic Test of increment/decrement ID functions