diff --git a/ior-a2 b/ior-a2 new file mode 100644 index 0000000..c55f5d5 --- /dev/null +++ b/ior-a2 @@ -0,0 +1 @@ +IOR with added interoperation delay. diff --git a/src/ior.c b/src/ior.c index 163a59c..548b779 100644 --- a/src/ior.c +++ b/src/ior.c @@ -703,6 +703,7 @@ static void DisplayUsage(char **argv) " -k keepFile -- don't remove the test file(s) on program exit", " -K keepFileWithError -- keep error-filled file(s) after data-checking", " -l storeFileOffset -- use file offset as stored signature", + " -L N interOpDelay -- delay between operations in seconds", " -m multiFile -- use number of reps (-i) for multiple file count", " -M N memoryPerNode -- hog memory on the node (e.g.: 2g, 75%)", " -n noFill -- no fill in HDF5 file creation", @@ -1561,6 +1562,7 @@ static void ShowTest(IOR_param_t * test) fprintf(stdout, "\t%s=%d\n", "repetitions", test->repetitions); fprintf(stdout, "\t%s=%d\n", "multiFile", test->multiFile); fprintf(stdout, "\t%s=%d\n", "interTestDelay", test->interTestDelay); + fprintf(stdout, "\t%s=%d\n", "interOpDelay", test->interOpDelay); fprintf(stdout, "\t%s=%d\n", "fsync", test->fsync); fprintf(stdout, "\t%s=%d\n", "fsYncperwrite", test->fsyncPerWrite); fprintf(stdout, "\t%s=%d\n", "useExistingTestFile", @@ -2579,6 +2581,9 @@ static IOR_offset_t WriteOrRead(IOR_param_t * test, void *fd, int access) test, transfer, test->blockSize, &amtXferred, &transferCount, access, &errors); } + + DelaySecs(test->interOpDelay); + dataMoved += amtXferred; pairCnt++; diff --git a/src/ior.h b/src/ior.h index b02c264..1201e40 100644 --- a/src/ior.h +++ b/src/ior.h @@ -58,6 +58,7 @@ typedef struct int repCounter; /* rep counter */ int multiFile; /* multiple files */ int interTestDelay; /* delay between reps in seconds */ + int interOpDelay; /* delay between operations in seconds */ int open; /* flag for writing or reading */ int readFile; /* read of existing file */ int writeFile; /* write of file */ diff --git a/src/parse_options.c b/src/parse_options.c index 9f66f1d..31732ab 100644 --- a/src/parse_options.c +++ b/src/parse_options.c @@ -154,6 +154,8 @@ void DecodeDirective(char *line, IOR_param_t *params) params->repetitions = atoi(value); } else if (strcasecmp(option, "intertestdelay") == 0) { params->interTestDelay = atoi(value); + } else if (strcasecmp(option, "interopdelay") == 0) { + params->interOpDelay = atoi(value); } else if (strcasecmp(option, "readfile") == 0) { params->readFile = atoi(value); } else if (strcasecmp(option, "writefile") == 0) { @@ -405,7 +407,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:kKlmM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ"; + "a:A:b:BcCd:D:eEf:FgG:hHi:Ij:J:kKlL:mM:nN:o:O:pPqQ:rRs:St:T:uU:vVwWxX:YzZ"; int c, i; static IOR_test_t *tests = NULL; @@ -502,6 +504,9 @@ IOR_test_t *ParseCommandLine(int argc, char **argv) case 'l': initialTestParams.storeFileOffset = TRUE; break; + case 'L': + initialTestParams.interOpDelay = atoi(optarg); + break; case 'M': initialTestParams.memoryPerNode = NodeMemoryStringToBytes(optarg);