MPIIO support fsync.
parent
fd4c306b98
commit
d938f0efe1
|
@ -370,9 +370,10 @@ static IOR_offset_t MPIIO_Xfer(int access, void *fd, IOR_size_t * buffer,
|
||||||
/*
|
/*
|
||||||
* Perform fsync().
|
* 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) {
|
if (param->filePerProc) {
|
||||||
tempOffset = tempOffset / param->transferSize;
|
tempOffset = tempOffset / param->transferSize;
|
||||||
} else {
|
} else {
|
||||||
/*
|
/*
|
||||||
* this formula finds a file view offset for a task
|
* this formula finds a file view offset for a task
|
||||||
* from an absolute offset
|
* from an absolute offset
|
||||||
*/
|
*/
|
||||||
|
|
17
src/ior.c
17
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);
|
TestIoSys(tptr);
|
||||||
|
|
||||||
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
||||||
if (tptr->params.stoneWallingStatusFile[0]){
|
if (tptr->params.stoneWallingStatusFile[0]){
|
||||||
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
||||||
|
@ -201,10 +200,12 @@ int ior_main(int argc, char **argv)
|
||||||
}
|
}
|
||||||
TestIoSys(tptr);
|
TestIoSys(tptr);
|
||||||
|
|
||||||
if (tptr->params.stoneWallingStatusFile[0]){
|
if(rank == 0 && tptr->params.stoneWallingWearOut){
|
||||||
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
if (tptr->params.stoneWallingStatusFile[0]){
|
||||||
}else{
|
StoreStoneWallingIterations(tptr->params.stoneWallingStatusFile, tptr->results->pairs_accessed);
|
||||||
fprintf(out_logfile, "Pairs deadlineForStonewallingaccessed: %lld\n", (long long) 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",
|
" -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 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 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 fsync -- perform fsync/msync upon POSIX/MMAP write close",
|
||||||
" -E useExistingTestFile -- do not remove test file before write access",
|
" -E useExistingTestFile -- do not remove test file before write access",
|
||||||
" -f S scriptFile -- test script name",
|
" -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)
|
if ((strcasecmp(test->api, "POSIX") != 0) && test->singleXferAttempt)
|
||||||
WARN_RESET("retry only available in POSIX",
|
WARN_RESET("retry only available in POSIX",
|
||||||
test, &defaults, singleXferAttempt);
|
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)
|
&& test->fsync)
|
||||||
WARN_RESET("fsync() only available in POSIX/MMAP",
|
WARN_RESET("fsync() only available in POSIX/MMAP",
|
||||||
test, &defaults, fsync);
|
test, &defaults, fsync);
|
||||||
|
|
Loading…
Reference in New Issue