summaryrefslogtreecommitdiffstats
path: root/src/H5Cmpio.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@lbl.gov>2020-08-28 23:03:08 (GMT)
committerQuincey Koziol <koziol@lbl.gov>2020-08-28 23:03:08 (GMT)
commit45021f1826f3710a3008430ddf7216bffb7068f7 (patch)
tree9bc4e2d7f804ea1c477bc491f8d5c2af57a41b55 /src/H5Cmpio.c
parent500cbbb71c7e5e5cf93578f39993fb58c1ddb096 (diff)
downloadhdf5-45021f1826f3710a3008430ddf7216bffb7068f7.zip
hdf5-45021f1826f3710a3008430ddf7216bffb7068f7.tar.gz
hdf5-45021f1826f3710a3008430ddf7216bffb7068f7.tar.bz2
Update buffer count
Diffstat (limited to 'src/H5Cmpio.c')
-rw-r--r--src/H5Cmpio.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/H5Cmpio.c b/src/H5Cmpio.c
index f451671..a4c295b 100644
--- a/src/H5Cmpio.c
+++ b/src/H5Cmpio.c
@@ -1011,6 +1011,7 @@ H5C__collective_write(H5F_t *f)
hbool_t ftype_created = FALSE;
int mpi_code;
char unused = 0; /* Unused, except for non-NULL pointer value */
+ size_t buf_count;
herr_t ret_value = SUCCEED;
FUNC_ENTER_STATIC
@@ -1085,6 +1086,9 @@ H5C__collective_write(H5F_t *f)
ftype_created = TRUE;
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&ftype)))
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
+
+ /* MPI count to write */
+ buf_count = 1;
} /* end if */
else {
/* Pass trivial buf type, file type to the file driver */
@@ -1093,6 +1097,9 @@ H5C__collective_write(H5F_t *f)
/* Set non-NULL pointer for I/O operation */
base_buf = &unused;
+
+ /* MPI count to write */
+ buf_count = 0;
} /* end else */
/* Pass buf type, file type to the file driver */
@@ -1100,7 +1107,7 @@ H5C__collective_write(H5F_t *f)
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O properties")
/* Write data */
- if(H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)0, (size_t)1, base_buf) < 0)
+ if(H5F_block_write(f, H5FD_MEM_DEFAULT, (haddr_t)0, buf_count, base_buf) < 0)
HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "unable to write entries collectively")
done: