diff --git a/src/parallel_io.c b/src/parallel_io.c index a960b72708161b9c7f7100875b6e56d4907186d8..603dd8a944d6df970860561b0d65f62b5575a7ef 100644 --- a/src/parallel_io.c +++ b/src/parallel_io.c @@ -212,7 +212,8 @@ void readArray(hid_t grp, struct io_props props, size_t N, long long N_total, /* Compute how many items are left */ if (N > max_chunk_size) { N -= max_chunk_size; - props.field += max_chunk_size * props.partSize; + props.field += max_chunk_size * props.partSize; /* char* on the field */ + props.parts += max_chunk_size; /* part* on the part */ offset += max_chunk_size; redo = 1; } else { @@ -463,7 +464,8 @@ void writeArray(struct engine* e, hid_t grp, char* fileName, FILE* xmfFile, /* Compute how many items are left */ if (N > max_chunk_size) { N -= max_chunk_size; - props.field += max_chunk_size * props.partSize; + props.field += max_chunk_size * props.partSize; /* char* on the field */ + props.parts += max_chunk_size; /* part* on the part */ offset += max_chunk_size; redo = 1; } else {