diff --git a/src/ior.c b/src/ior.c index 47542ce..7e71c19 100755 --- a/src/ior.c +++ b/src/ior.c @@ -793,6 +793,7 @@ static void DisplayUsage(char **argv) " -x singleXferAttempt -- do not retry transfer if incomplete", " -X N reorderTasksRandomSeed -- random seed for -Z option", " -y stoneWallingWearOut -- once the stonewalling timout is over, all process finish to access the amount of data", + " -1 stoneWallingWearOutIterations stop after processing this number of iterations, needed for reading data back written with -y", " -Y fsyncPerWrite -- perform fsync after each POSIX write", " -z randomOffset -- access is to random, not sequential, offsets within a file", " -Z reorderTasksRandom -- changes task ordering to random ordering for readback", @@ -2635,13 +2636,13 @@ static IOR_offset_t WriteOrRead(IOR_param_t * test, IOR_results_t * results, voi > test->deadlineForStonewalling)); /* loop over offsets to access */ - while ((offsetArray[pairCnt] != -1) && !hitStonewall) { + while ((offsetArray[pairCnt] != -1) && !hitStonewall ) { dataMoved += WriteOrReadSingle(pairCnt, offsetArray, pretendRank, & transferCount, & errors, test, fd, ioBuffers, access); pairCnt++; hitStonewall = ((test->deadlineForStonewalling != 0) && ((GetTimeStamp() - startForStonewall) - > test->deadlineForStonewalling)); + > test->deadlineForStonewalling)) || (test->stoneWallingWearOutIterations != 0 && pairCnt == test->stoneWallingWearOutIterations) ; } if (test->stoneWallingWearOut){ MPI_CHECK(MPI_Allreduce(& pairCnt, &results->pairs_accessed, diff --git a/src/ior.h b/src/ior.h index 2d81abe..1159883 100755 --- a/src/ior.h +++ b/src/ior.h @@ -142,6 +142,7 @@ typedef struct int storeFileOffset; /* use file offset as stored signature */ int deadlineForStonewalling; /* max time in seconds to run any test phase */ int stoneWallingWearOut; /* wear out the stonewalling, once the timout is over, each process has to write the same amount */ + int stoneWallingWearOutIterations; /* the number of iterations for the stonewallingWearOut, needed for readBack */ int maxTimeDuration; /* max time in minutes to run each test */ int outlierThreshold; /* warn on outlier N seconds from mean */ int verbose; /* verbosity */ diff --git a/src/parse_options.c b/src/parse_options.c index 8db715a..26fbef0 100755 --- a/src/parse_options.c +++ b/src/parse_options.c @@ -432,7 +432,7 @@ IOR_test_t *ReadConfigScript(char *scriptName) IOR_test_t *ParseCommandLine(int argc, char **argv) { static const char *opts = - "a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKl:mM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZy"; + "a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKl:mM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZy1:"; int c, i; static IOR_test_t *tests = NULL; @@ -612,6 +612,9 @@ IOR_test_t *ParseCommandLine(int argc, char **argv) case 'X': initialTestParams.reorderTasksRandomSeed = atoi(optarg); break; + case '1': + initialTestParams.stoneWallingWearOutIterations = atoi(optarg); + break; case 'y': initialTestParams.stoneWallingWearOut = TRUE; break;