diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2001-04-27 03:52:24 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2001-04-27 03:52:24 (GMT) |
commit | fef182fd966c8c113a5bab02f19afca4c91f0ba5 (patch) | |
tree | 952bcd243d030ea9fc63bf6d457754abdbbea1c0 /fortran/examples/selectele.f90 | |
parent | 9aba4e88c26d98aafaf231163e949b9a53aa9561 (diff) | |
download | hdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.zip hdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.tar.gz hdf5-fef182fd966c8c113a5bab02f19afca4c91f0ba5.tar.bz2 |
[svn-r3862]
Purpose:
Codemaintenance
Description:
read/write APIs have been changed.
Solution:
Made necessary changes to the source code.
Platforms tested:
Linux, Solaris 2.7, O2K, T3E
Diffstat (limited to 'fortran/examples/selectele.f90')
-rw-r--r-- | fortran/examples/selectele.f90 | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/fortran/examples/selectele.f90 b/fortran/examples/selectele.f90 index e0f25c8..60e3241 100644 --- a/fortran/examples/selectele.f90 +++ b/fortran/examples/selectele.f90 @@ -50,6 +50,7 @@ INTEGER :: error ! Error flag LOGICAL :: status + INTEGER, DIMENSION(7) :: data_dims ! @@ -103,9 +104,11 @@ ! ! Write the datasets. ! - CALL h5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, buf1, error) + data_dims(1) = 3 + data_dims(2) = 4 + CALL h5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, buf1, data_dims, error) - CALL h5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, buf2, error) + CALL h5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, buf2, data_dims, error) ! ! Close the dataspace for the datasets. @@ -176,7 +179,8 @@ ! ! Write value into the selected points in dataset1. ! - CALL H5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, val, error, & + data_dims(1) = 2 + CALL H5dwrite_f(dset1_id, H5T_NATIVE_INTEGER, val, data_dims, error, & mem_space_id=memspace, file_space_id=dataspace1) ! @@ -187,7 +191,8 @@ ! ! Write value into the selected points in dataset2. ! - CALL H5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, val, error, & + data_dims(1) = 2 + CALL H5dwrite_f(dset2_id, H5T_NATIVE_INTEGER, val, data_dims, error, & mem_space_id=memspace, file_space_id=dataspace2) ! @@ -237,7 +242,9 @@ ! ! Read dataset from the first file. ! - CALL h5dread_f(dset1_id, H5T_NATIVE_INTEGER, bufnew, error) + data_dims(1) = 3 + data_dims(2) = 4 + CALL h5dread_f(dset1_id, H5T_NATIVE_INTEGER, bufnew, data_dims, error) ! ! Display the data read from dataset "Copy1" @@ -250,7 +257,7 @@ ! ! Read dataset from the second file. ! - CALL h5dread_f(dset2_id, H5T_NATIVE_INTEGER, bufnew, error) + CALL h5dread_f(dset2_id, H5T_NATIVE_INTEGER, bufnew, data_dims, error) ! ! Display the data read from dataset "Copy2" |