Skip to content

Commit

Permalink
use MPI independent write when nprocs == 1
Browse files Browse the repository at this point in the history
  • Loading branch information
wkliao committed Aug 30, 2024
1 parent c4a2eb4 commit 4cb0b2d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/drivers/ncmpio/ncmpio_enddef.c
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,12 @@ move_file_block(NC *ncp,
*/
memset(&mpistatus, 0, sizeof(MPI_Status));

TRACE_IO(MPI_File_write_at_all)(fh, to+nbytes+rank*chunk_size,
if (ncp->nprocs > 1)
TRACE_IO(MPI_File_write_at_all)(fh, to+nbytes+rank*chunk_size,
buf, get_size /* NOT bufcount */,
MPI_BYTE, &mpistatus);
else
TRACE_IO(MPI_File_write_at)(fh, to+nbytes+rank*chunk_size,
buf, get_size /* NOT bufcount */,
MPI_BYTE, &mpistatus);
if (mpireturn != MPI_SUCCESS) {
Expand Down

0 comments on commit 4cb0b2d

Please sign in to comment.