1 integer(hid_t) :: plist_id
2 integer(hid_t) :: dset_id
3 integer(hid_t) :: memspace
4 integer(hid_t) :: filespace
5 integer(hsize_t) :: dimsfi(dspace_dims)
6 integer(hsize_t) :: block(dspace_dims)
7 integer(hsize_t) :: start(dspace_dims)
8 integer(hsize_t) :: count(dspace_dims)
9 integer(hsize_t) :: stride(dspace_dims)
18 dimsfi = int(global_size, hsize_t)
19 block = int(shape(array), hsize_t)
20 start = int(offset, hsize_t)
25 call h5screate_simple_f(rank, dimsfi, filespace, error)
26 sll_assert_always(error == 0)
28 call h5screate_simple_f(rank, block, memspace, error)
29 sll_assert_always(error == 0)
34 call h5pcreate_f(h5p_dataset_create_f, plist_id, error)
35 sll_assert_always(error == 0)
40 if (
present(chunk_dims))
then
41 call h5pset_chunk_f(plist_id, rank, chunk_dims, error)
42 sll_assert_always(error == 0)
45 call h5dcreate_f(handle%file_id, dsetname, datatype, filespace, &
46 dset_id, error, plist_id)
47 sll_assert_always(error == 0)
49 call h5pclose_f(plist_id, error)
50 sll_assert_always(error == 0)
52 call h5sclose_f(filespace, error)
53 sll_assert_always(error == 0)
61 call h5dget_space_f(dset_id, filespace, error)
62 sll_assert_always(error == 0)
64 call h5sselect_hyperslab_f(filespace, h5s_select_set_f, &
65 start, count, error, stride, block)
66 sll_assert_always(error == 0)
74 call h5pcreate_f(h5p_dataset_xfer_f, plist_id, error)
75 sll_assert_always(error == 0)
77 call h5pset_dxpl_mpio_f(plist_id, h5fd_mpio_collective_f, error)
78 sll_assert_always(error == 0)
83 call h5dwrite_f(dset_id, datatype, array, dimsfi, error, &
84 file_space_id=filespace, mem_space_id=memspace, &
86 sll_assert_always(error == 0)
91 call h5pclose_f(plist_id, error)
92 sll_assert_always(error == 0)
97 call h5sclose_f(filespace, error)
98 sll_assert_always(error == 0)
100 call h5sclose_f(memspace, error)
101 sll_assert_always(error == 0)
106 call h5dclose_f(dset_id, error)
107 sll_assert_always(error == 0)