summaryrefslogtreecommitdiffstats
path: root/fortran/test/tH5R.f90
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2000-10-10 04:14:44 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2000-10-10 04:14:44 (GMT)
commita5a3f3c7369f54b2a2d5b6a5b910b6b8ecd64801 (patch)
tree38c3814233b60029f659e39b138e4cb8a9c1ef23 /fortran/test/tH5R.f90
parent02092cd24e8cb79c66903d5556515bd755deeeeb (diff)
downloadhdf5-a5a3f3c7369f54b2a2d5b6a5b910b6b8ecd64801.zip
hdf5-a5a3f3c7369f54b2a2d5b6a5b910b6b8ecd64801.tar.gz
hdf5-a5a3f3c7369f54b2a2d5b6a5b910b6b8ecd64801.tar.bz2
[svn-r2649]
Purpose: Rewrote test to use new APIs to read and write references. Platforms tested: J90 and Solaris 2.6
Diffstat (limited to 'fortran/test/tH5R.f90')
-rw-r--r--fortran/test/tH5R.f9017
1 files changed, 11 insertions, 6 deletions
diff --git a/fortran/test/tH5R.f90 b/fortran/test/tH5R.f90
index 56b7a21..9cd75fd 100644
--- a/fortran/test/tH5R.f90
+++ b/fortran/test/tH5R.f90
@@ -38,6 +38,7 @@
INTEGER :: rankr = 1
TYPE(hobj_ref_t_f), DIMENSION(4) :: ref
TYPE(hobj_ref_t_f), DIMENSION(4) :: ref_out
+ INTEGER :: ref_dim
INTEGER, DIMENSION(5) :: data = (/1, 2, 3, 4, 5/)
!
@@ -123,8 +124,8 @@
CALL check("h5rcreate_f",error,total_error)
CALL h5rcreate_f(file_id, "MyType", ref(4), error)
CALL check("h5rcreate_f",error,total_error)
-
- CALL h5dwrite_f(dsetr_id, H5T_STD_REF_OBJ, ref, error)
+ ref_dim = size(ref)
+ CALL h5dwrite_f(dsetr_id, H5T_STD_REF_OBJ, ref, ref_dim, error)
CALL check("h5dwrite_f",error,total_error)
!
@@ -132,13 +133,13 @@
!
CALL h5dclose_f(dsetr_id, error)
CALL check("h5dclose_f",error,total_error)
-
!
! Reopen the dataset with object references
!
CALL h5dopen_f(file_id, dsetnamer,dsetr_id,error)
CALL check("h5dopen_f",error,total_error)
- CALL h5dread_f(dsetr_id, H5T_STD_REF_OBJ, ref_out, error)
+ ref_dim = size(ref_out)
+ CALL h5dread_f(dsetr_id, H5T_STD_REF_OBJ, ref_out, ref_dim, error)
CALL check("h5dread_f",error,total_error)
!
@@ -205,6 +206,7 @@
INTEGER :: error
TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref ! Buffers to store references
TYPE(hdset_reg_ref_t_f) , DIMENSION(2) :: ref_out !
+ INTEGER :: ref_dim
INTEGER(HSIZE_T), DIMENSION(2) :: dims = (/2,9/) ! Datasets dimensions
INTEGER(HSIZE_T), DIMENSION(1) :: dimsr = (/2/) !
INTEGER(HSSIZE_T), DIMENSION(2) :: start
@@ -287,7 +289,8 @@
!
! Write dataset with the references.
!
- CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, error)
+ ref_dim = size(ref)
+ CALL h5dwrite_f(dsetr_id, H5T_STD_REF_DSETREG, ref, ref_dim, error)
CALL check("h5dwrite_f", error, total_error)
!
! Close all objects.
@@ -310,7 +313,8 @@
!
! Read references to the dataset regions.
!
- CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, error)
+ ref_dim = size(ref_out)
+ CALL h5dread_f(dsetr_id, H5T_STD_REF_DSETREG, ref_out, ref_dim, error)
CALL check("h5dread_f", error, total_error)
!
! Dereference the first reference.
@@ -335,6 +339,7 @@
!
CALL H5rdereference_f(dsetr_id, ref_out(2), dsetv_id, error)
CALL check("h5rdereference_f", error, total_error)
+
CALL H5rget_region_f(dsetr_id, ref_out(2), space_id, error)
CALL check("h5rget_region_f", error, total_error)
!