Skip to content
Snippets Groups Projects
Commit 5853d822 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Re-instate the check to sensure that the chunck size is < size of the array

parent afc632f6
No related branches found
No related tags found
2 merge requests!136Master,!116Basic implementation of gparts
...@@ -202,6 +202,9 @@ void writeArrayBackEnd(hid_t grp, char* fileName, FILE* xmfFile, char* name, ...@@ -202,6 +202,9 @@ void writeArrayBackEnd(hid_t grp, char* fileName, FILE* xmfFile, char* name,
chunk_shape[1] = 0; chunk_shape[1] = 0;
} }
/* Make sure the chunks are not larger than the dataset */
if (chunk_shape[0] > N) chunk_shape[0] = N;
/* Change shape of data space */ /* Change shape of data space */
h_err = H5Sset_extent_simple(h_space, rank, shape, NULL); h_err = H5Sset_extent_simple(h_space, rank, shape, NULL);
if (h_err < 0) { if (h_err < 0) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment