Skip to content
This repository was archived by the owner on Feb 24, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ior-a2
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
IOR with added interoperation delay.
5 changes: 5 additions & 0 deletions src/ior.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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++;

Expand Down
1 change: 1 addition & 0 deletions src/ior.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
7 changes: 6 additions & 1 deletion src/parse_options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand Down