|
1 | | -integer(HID_T) :: did, sid, mem_sid, dtype |
| 1 | +integer(HID_T) :: file_space_id, mem_space_id, dset_id, xfer_id, dtype |
2 | 2 | integer(HSIZE_T) :: dims(rank(value)) |
3 | 3 | integer :: ier |
4 | 4 |
|
| 5 | +xfer_id = H5P_DEFAULT_F |
| 6 | + |
5 | 7 | dims = shape(value, HSIZE_T) |
6 | 8 |
|
7 | 9 | select type (value) |
|
17 | 19 | error stop "unknown variable type for " // dname |
18 | 20 | end select |
19 | 21 |
|
20 | | -call hdf_create(self, dname, dtype, dims, sid, did, chunk_size, istart, iend, stride, compact) |
| 22 | +call hdf_create(self, dname, dtype, dims, file_space_id, dset_id, chunk_size, istart, iend, stride, compact) |
21 | 23 |
|
22 | | -mem_sid = H5S_ALL_F !< default |
| 24 | +mem_space_id = H5S_ALL_F !< default |
23 | 25 |
|
24 | 26 | if(present(istart) .and. present(iend)) then |
25 | 27 | if(present(stride)) then |
26 | 28 | !! necessary to use this present check for Intel and GCC |
27 | | - call hdf_get_slice(self, dname, did, sid, mem_sid, istart, iend, stride) |
| 29 | + call hdf_get_slice(self, dname, dset_id, file_space_id, mem_space_id, istart, iend, stride) |
28 | 30 | else |
29 | | - call hdf_get_slice(self, dname, did, sid, mem_sid, istart, iend) |
| 31 | + call hdf_get_slice(self, dname, dset_id, file_space_id, mem_space_id, istart, iend) |
30 | 32 | endif |
31 | 33 | endif |
32 | 34 |
|
33 | 35 | select type (value) |
34 | 36 | type is (real(real32)) |
35 | | - call h5dwrite_f(did, dtype, value, dims, ier, mem_sid, sid) |
| 37 | + call h5dwrite_f(dset_id, dtype, value, dims, ier, file_space_id=file_space_id, mem_space_id=mem_space_id, xfer_prp=xfer_id) |
36 | 38 | type is (real(real64)) |
37 | | - call h5dwrite_f(did, dtype, value, dims, ier, mem_sid, sid) |
| 39 | + call h5dwrite_f(dset_id, dtype, value, dims, ier, file_space_id=file_space_id, mem_space_id=mem_space_id, xfer_prp=xfer_id) |
38 | 40 | type is (integer(int32)) |
39 | | - call h5dwrite_f(did, dtype, value, dims, ier, mem_sid, sid) |
| 41 | + call h5dwrite_f(dset_id, dtype, value, dims, ier, file_space_id=file_space_id, mem_space_id=mem_space_id, xfer_prp=xfer_id) |
40 | 42 | type is (integer(int64)) |
41 | | - call h5dwrite_f(did, dtype, value, dims, ier, mem_sid, sid) |
| 43 | + call h5dwrite_f(dset_id, dtype, value, dims, ier, file_space_id=file_space_id, mem_space_id=mem_space_id, xfer_prp=xfer_id) |
42 | 44 | class default |
43 | 45 | error stop "unknown variable type for " // dname |
44 | 46 | end select |
45 | 47 | if (ier/=0) error stop 'h5fortran:ERROR: could not write ' // dname // ' to ' // self%filename |
46 | 48 |
|
47 | | -call hdf_wrapup(did, sid) |
| 49 | +call hdf_wrapup(dset_id, file_space_id) |
0 commit comments