summaryrefslogtreecommitdiffstats
path: root/src/H5FDmpio.c
diff options
context:
space:
mode:
authorjhendersonHDF <jhenderson@hdfgroup.org>2023-10-10 15:11:22 (GMT)
committerGitHub <noreply@github.com>2023-10-10 15:11:22 (GMT)
commitbfbfaf72e17fcc9efa848557a0c57c0583d5c8c4 (patch)
tree46c6309ab264df8af6bba567713a22bb187baa2f /src/H5FDmpio.c
parent7631015ea4af183c01025c4907869f47f7355c51 (diff)
downloadhdf5-bfbfaf72e17fcc9efa848557a0c57c0583d5c8c4.zip
hdf5-bfbfaf72e17fcc9efa848557a0c57c0583d5c8c4.tar.gz
hdf5-bfbfaf72e17fcc9efa848557a0c57c0583d5c8c4.tar.bz2
Update parallel compression feature to support multi-dataset I/O (#3591)
Diffstat (limited to 'src/H5FDmpio.c')
-rw-r--r--src/H5FDmpio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/H5FDmpio.c b/src/H5FDmpio.c
index 5e2668b..7141550 100644
--- a/src/H5FDmpio.c
+++ b/src/H5FDmpio.c
@@ -3025,9 +3025,9 @@ H5FD__mpio_read_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED d
* s_bufs[] to find the smallest value, and choose that for
* mpi_bufs_base.
*/
- j = 0; /* guess at the index of the smallest value of s_bufs[] */
- if (s_bufs[j + 1].vp != NULL) {
+ j = 0; /* guess at the index of the smallest value of s_bufs[] */
+ if ((count > 1) && (s_bufs[1].vp != NULL)) {
for (i = 1; i < count; i++)
if (s_bufs[i].vp < s_bufs[j].vp)
j = i;
@@ -3375,9 +3375,9 @@ H5FD__mpio_write_selection(H5FD_t *_file, H5FD_mem_t type, hid_t H5_ATTR_UNUSED
* s_bufs[] to find the smallest value, and choose that for
* mpi_bufs_base.
*/
- j = 0; /* guess at the index of the smallest value of s_bufs[] */
- if (s_bufs[j + 1].cvp != NULL) {
+ j = 0; /* guess at the index of the smallest value of s_bufs[] */
+ if ((count > 1) && (s_bufs[1].cvp != NULL)) {
for (i = 1; i < count; i++)
if (s_bufs[i].cvp < s_bufs[j].cvp)
j = i;