mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-18 15:15:56 +08:00
Update buffer count
This commit is contained in:
parent
500cbbb71c
commit
45021f1826
@ -1011,6 +1011,7 @@ H5C__collective_write(H5F_t *f)
|
|||||||
hbool_t ftype_created = FALSE;
|
hbool_t ftype_created = FALSE;
|
||||||
int mpi_code;
|
int mpi_code;
|
||||||
char unused = 0; /* Unused, except for non-NULL pointer value */
|
char unused = 0; /* Unused, except for non-NULL pointer value */
|
||||||
|
size_t buf_count;
|
||||||
herr_t ret_value = SUCCEED;
|
herr_t ret_value = SUCCEED;
|
||||||
|
|
||||||
FUNC_ENTER_STATIC
|
FUNC_ENTER_STATIC
|
||||||
@ -1085,6 +1086,9 @@ H5C__collective_write(H5F_t *f)
|
|||||||
ftype_created = TRUE;
|
ftype_created = TRUE;
|
||||||
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&ftype)))
|
if(MPI_SUCCESS != (mpi_code = MPI_Type_commit(&ftype)))
|
||||||
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
|
HMPI_GOTO_ERROR(FAIL, "MPI_Type_commit failed", mpi_code)
|
||||||
|
|
||||||
|
/* MPI count to write */
|
||||||
|
buf_count = 1;
|
||||||
} /* end if */
|
} /* end if */
|
||||||
else {
|
else {
|
||||||
/* Pass trivial buf type, file type to the file driver */
|
/* 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 */
|
/* Set non-NULL pointer for I/O operation */
|
||||||
base_buf = &unused;
|
base_buf = &unused;
|
||||||
|
|
||||||
|
/* MPI count to write */
|
||||||
|
buf_count = 0;
|
||||||
} /* end else */
|
} /* end else */
|
||||||
|
|
||||||
/* Pass buf type, file type to the file driver */
|
/* 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")
|
HGOTO_ERROR(H5E_CACHE, H5E_CANTSET, FAIL, "can't set MPI-I/O properties")
|
||||||
|
|
||||||
/* Write data */
|
/* 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")
|
HGOTO_ERROR(H5E_CACHE, H5E_WRITEERROR, FAIL, "unable to write entries collectively")
|
||||||
|
|
||||||
done:
|
done:
|
||||||
|
Loading…
Reference in New Issue
Block a user