summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5G.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-09-25 22:24:55 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-09-25 22:24:55 (GMT)
commit11b0fad3fa6249922b37c8a35117fb3340df2020 (patch)
tree61c9d8759bc32b9280b3e0bd1d44709fbbec6ef4 /fortran/test/tH5G.f90
parent12e30dc9b284cae8dd821ffec93c344b7fb0d96b (diff)
downloadhdf5-11b0fad3fa6249922b37c8a35117fb3340df2020.zip
hdf5-11b0fad3fa6249922b37c8a35117fb3340df2020.tar.gz
hdf5-11b0fad3fa6249922b37c8a35117fb3340df2020.tar.bz2
[svn-r5948]
Purpose: Added new fortran functions Description: Source code, tests and documentation for h5glink2_f and h5gmove2_f functions were added. I also added missing man page for h5glink_f Platforms tested: Solaris 2.7, IRIX64-6.5 and Liniux 2.2
Diffstat (limited to 'fortran/test/tH5G.f90')
-rw-r--r--fortran/test/tH5G.f9024
1 files changed, 18 insertions, 6 deletions
diff --git a/fortran/test/tH5G.f90 b/fortran/test/tH5G.f90
index f4b17f5..e10c4c8 100644
--- a/fortran/test/tH5G.f90
+++ b/fortran/test/tH5G.f90
@@ -17,7 +17,7 @@
! This subroutine tests following functionalities:
! h5gcreate_f, h5gopen_f, h5gclose_f, (?)h5gget_obj_info_idx_f, h5gn_members_f
-! h5glink_f, h5gunlink_f, h5gmove_f, h5gget_linkval_f, h5gset_comment_f,
+! h5glink(2)_f, h5gunlink_f, h5gmove(2)_f, h5gget_linkval_f, h5gset_comment_f,
! h5gget_comment_f
USE HDF5 ! This module contains all necessary modules
@@ -46,6 +46,7 @@
INTEGER(HID_T) :: group2_id ! Group identifier
INTEGER(HID_T) :: dset1_id ! Dataset identifier
INTEGER(HID_T) :: dset2_id ! Dataset identifier
+ INTEGER(HID_T) :: dsetnew_id ! Dataset identifier
INTEGER(HID_T) :: dspace_id ! Data space identifier
INTEGER, DIMENSION(1) :: dset1_data = 34 ! Data value
@@ -122,8 +123,8 @@
!
!Create a hard link to the group2
!
- CALL h5glink_f(file_id, H5G_LINK_HARD_F, groupname2, linkname2, error)
- CALL check("h5glink_f",error,total_error)
+ CALL h5glink2_f(file_id, groupname2, H5G_LINK_HARD_F, file_id, linkname2, error)
+ CALL check("h5glink2_f",error,total_error)
!
!Create a soft link to dataset11
!
@@ -210,8 +211,19 @@
write(*,*) "got comment ", commentout, " is wrong"
total_error = total_error +1
end if
+ !
+ ! Move dataset1 to gourp2_id location
+ !
+ CALL h5dclose_f(dset1_id, error)
+ CALL check("h5dclose_f", error, total_error)
-
+ CALL h5gmove2_f(file_id, dsetname1, group2_id, "dset1", error)
+ CALL check("h5gmove2_f", error, total_error)
+ !
+ ! Open dataset from the new location
+ !
+ Call h5dopen_f(file_id, "/MyGroup/Group_A/dset1" , dsetnew_id, error)
+ CALL check("h5dopen_f",error, total_error)
!
!release all the resources
!
@@ -221,10 +233,10 @@
CALL check("h5gclose_f", error, total_error)
CALL h5gclose_f(group2_id, error)
CALL check("h5gclose_f", error, total_error)
- CALL h5dclose_f(dset1_id, error)
- CALL check("h5dclose_f", error, total_error)
CALL h5dclose_f(dset2_id, error)
CALL check("h5dclose_f", error, total_error)
+ CALL h5dclose_f(dsetnew_id, error)
+ CALL check("h5dclose_f", error, total_error)
CALL h5sclose_f(dspace_id, error)
CALL check("h5sclose_f", error, total_error)