diff options
author | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2014-07-18 22:17:58 (GMT) |
---|---|---|
committer | Scot Breitenfeld <brtnfld@hdfgroup.org> | 2014-07-18 22:17:58 (GMT) |
commit | 442f9854645775a2bc7b20efe2170fb5a15ea29b (patch) | |
tree | be5df249ef8c9d178797bc1be422f251192de8cf /fortran/test/tH5P_F03.f90 | |
parent | b79ca69a25aa612a97bc0aaa13710a2bf27a6376 (diff) | |
download | hdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.zip hdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.tar.gz hdf5-442f9854645775a2bc7b20efe2170fb5a15ea29b.tar.bz2 |
[svn-r25433] Brought changes from the trunk into the branch.
For the top level, brings in changes for configure.ac, configure and the MANIFEST:
svn merge -c25286 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .
svn merge -c25287 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .
svn merge -c25290 https://svn.hdfgroup.uiuc.edu/hdf5/trunk .
For the fortran level:
384 17:00 svn merge -r25235:25272 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
389 17:01 svn merge -r25284:25432 https://svn.hdfgroup.uiuc.edu/hdf5/trunk/fortran
For the fortran merges, I skipped changes relating to hyperslab selection since the C source has not been merged from the trunk yet. These changes should be in place in the fortran source when the C source is merged to the 1.8 branch.
Diffstat (limited to 'fortran/test/tH5P_F03.f90')
-rw-r--r-- | fortran/test/tH5P_F03.f90 | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/fortran/test/tH5P_F03.f90 b/fortran/test/tH5P_F03.f90 index 6039a52..91d9e3a 100644 --- a/fortran/test/tH5P_F03.f90 +++ b/fortran/test/tH5P_F03.f90 @@ -106,20 +106,12 @@ SUBROUTINE test_create(total_error) INTEGER(hsize_t), DIMENSION(1:5), PARAMETER :: ch_size= (/1, 1, 1, 4, 1/) CHARACTER(LEN=14) :: filename ='test_create.h5' - ! /* compound datatype operations */ - TYPE, BIND(C) :: comp_datatype - REAL :: a - INTEGER :: x - DOUBLE PRECISION :: y - CHARACTER(LEN=1) :: z - END TYPE comp_datatype - TYPE(comp_datatype), TARGET :: rd_c, fill_ctype INTEGER :: error INTEGER(SIZE_T) :: h5off TYPE(C_PTR) :: f_ptr LOGICAL :: differ1, differ2 - + !/* ! * Create a file. ! */ @@ -136,8 +128,7 @@ SUBROUTINE test_create(total_error) CALL check("h5pset_chunk_f",error, total_error) ! /* Create a compound datatype */ - - CALL h5tcreate_f(H5T_COMPOUND_F, INT(SIZEOF(fill_ctype),size_t), comp_type_id, error) + CALL h5tcreate_f(H5T_COMPOUND_F, H5_SIZEOF(fill_ctype), comp_type_id, error) CALL check("h5tcreate_f", error, total_error) h5off = H5OFFSETOF(C_LOC(fill_ctype), C_LOC(fill_ctype%a)) CALL h5tinsert_f(comp_type_id, "a", h5off , H5T_NATIVE_REAL, error) @@ -394,6 +385,8 @@ SUBROUTINE test_h5p_file_image(total_error) TYPE(C_PTR), DIMENSION(1:count) :: f_ptr1 TYPE(C_PTR), DIMENSION(1:1) :: f_ptr2 + INTEGER(HSIZE_T) :: sizeof_buffer + ! Initialize file image buffer DO i = 1, count buffer(i) = i*10 @@ -412,7 +405,8 @@ SUBROUTINE test_h5p_file_image(total_error) ! Set file image f_ptr = C_LOC(buffer(1)) - size = SIZEOF(buffer) + size = H5_SIZEOF(buffer(1))*count + CALL h5pset_file_image_f(fapl_1, f_ptr, size, error) CALL check("h5pset_file_image_f", error, total_error) @@ -465,8 +459,8 @@ SUBROUTINE external_test_offset(cleanup,total_error) INTEGER(hid_t) :: dset=-1 ! dataset INTEGER(hid_t) :: grp=-1 ! group to emit diagnostics INTEGER(size_t) :: i, j ! miscellaneous counters - CHARACTER(LEN=180) :: filename ! file names - INTEGER, DIMENSION(1:25) :: part ! raw data buffers + CHARACTER(LEN=180) :: filename ! file names + INTEGER, DIMENSION(1:25) :: part INTEGER, DIMENSION(1:100), TARGET :: whole ! raw data buffers INTEGER(hsize_t), DIMENSION(1:1) :: cur_size ! current data space size INTEGER(hid_t) :: hs_space ! hyperslab data space @@ -475,6 +469,7 @@ SUBROUTINE external_test_offset(cleanup,total_error) CHARACTER(LEN=1) :: ichr1 ! character conversion holder INTEGER :: error ! error status TYPE(C_PTR) :: f_ptr ! fortran pointer + INTEGER(HSIZE_T) :: sizeof_part CHARACTER(LEN=1,KIND=C_CHAR), DIMENSION(1:30) :: temparray @@ -503,15 +498,18 @@ SUBROUTINE external_test_offset(cleanup,total_error) CALL check("h5gcreate_f",error, total_error) ! Create the dataset + + sizeof_part = INT(H5_SIZEOF(part(1))*25, hsize_t) + CALL h5pcreate_f(H5P_DATASET_CREATE_F, dcpl, error) CALL check("h5pcreate_f", error, total_error) - CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), INT(SIZEOF(part), hsize_t), error) + CALL h5pset_external_f(dcpl, "extern_1a.raw", INT(0,off_t), sizeof_part, error) CALL check("h5pset_external_f",error,total_error) - CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), INT(SIZEOF(part), hsize_t), error) + CALL h5pset_external_f(dcpl, "extern_2a.raw", INT(10,off_t), sizeof_part, error) CALL check("h5pset_external_f",error,total_error) - CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), INT(SIZEOF(part), hsize_t), error) + CALL h5pset_external_f(dcpl, "extern_3a.raw", INT(20,off_t), sizeof_part, error) CALL check("h5pset_external_f",error,total_error) - CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), INT(SIZEOF(part), hsize_t), error) + CALL h5pset_external_f(dcpl, "extern_4a.raw", INT(30,off_t), sizeof_part, error) CALL check("h5pset_external_f",error,total_error) cur_size(1) = 100 |