diff --git a/src/aiori-MPIIO.c b/src/aiori-MPIIO.c index 9f5adce..b7ac933 100755 --- a/src/aiori-MPIIO.c +++ b/src/aiori-MPIIO.c @@ -370,9 +370,10 @@ static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer, /* * Perform fsync(). */ -static void MPIIO_Fsync(void *fd, IOR_param_t * param) +static void MPIIO_Fsync(void *fdp, IOR_param_t * param) { - ; + MPI_File * fd = (MPI_File*) fdp; + MPI_File_sync(*fd); } /* @@ -438,7 +439,7 @@ static IOR_offset_t SeekOffset(MPI_File fd, IOR_offset_t offset, if (param->filePerProc) { tempOffset = tempOffset / param->transferSize; } else { - /* + /* * this formula finds a file view offset for a task * from an absolute offset */ diff --git a/src/ior.c b/src/ior.c index 52d126b..c53487e 100755 --- a/src/ior.c +++ b/src/ior.c @@ -98,7 +98,6 @@ IOR_test_t * ior_run(int argc, char **argv, MPI_Comm world_com, FILE * world_out } TestIoSys(tptr); - if(rank == 0 && tptr->params.stoneWallingWearOut){ if (tptr->params.stoneWallingStatusFile[0]){ StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed); @@ -201,10 +200,12 @@ int ior_main(int argc, char **argv) } TestIoSys(tptr); - if (tptr->params.stoneWallingStatusFile[0]){ - StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed); - }else{ - fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed); + if(rank == 0 && tptr->params.stoneWallingWearOut){ + if (tptr->params.stoneWallingStatusFile[0]){ + StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed); + }else{ + fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) tptr->results->pairs_accessed); + } } } @@ -719,7 +720,7 @@ static void DisplayUsage(char **argv) " -D N deadlineForStonewalling -- seconds before stopping write or read phase", " -O stoneWallingWearOut=1 -- once the stonewalling timout is over, all process finish to access the amount of data", " -O stoneWallingWearOutIterations=N -- stop after processing this number of iterations, needed for reading data back written with stoneWallingWearOut", - " -O stoneWallingStatusFile=FILE -- this file keeps the number of iterations from stonewalling during write and allows to use them for read" + " -O stoneWallingStatusFile=FILE -- this file keeps the number of iterations from stonewalling during write and allows to use them for read", " -e fsync -- perform fsync/msync upon POSIX/MMAP write close", " -E useExistingTestFile -- do not remove test file before write access", " -f S scriptFile -- test script name", @@ -2313,7 +2314,9 @@ static void ValidateTests(IOR_param_t * test) if ((strcasecmp(test->api, "POSIX") != 0) && test->singleXferAttempt) WARN_RESET("retry only available in POSIX", test, &defaults, singleXferAttempt); - if ((strcasecmp(test->api, "POSIX") != 0) && (strcasecmp(test->api, "MMAP") != 0) + if ((strcasecmp(test->api, "POSIX") != 0) && + (strcasecmp(test->api, "MMAP") != 0) && + (strcasecmp(test->api, "MPIIO") != 0) && test->fsync) WARN_RESET("fsync() only available in POSIX/MMAP", test, &defaults, fsync);