diff --git a/src/aiori-MPIIO.c b/src/aiori-MPIIO.c index 8f04310..af8094b 100755 --- a/src/aiori-MPIIO.c +++ b/src/aiori-MPIIO.c @@ -342,6 +342,8 @@ static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer, } } } + if((access == WRITE) && (param->fsyncPerWrite == TRUE)) + MPIIO_Fsync(fd, param); return (length); } @@ -350,7 +352,8 @@ static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer, */ static void MPIIO_Fsync(void *fd, IOR_param_t * param) { - ; + if (MPI_File_sync(*(MPI_File *)fd) != MPI_SUCCESS) + EWARN("fsync() failed"); } /*