Got IOR shifting to work regardless of whether node/task mapping is round-robin or contiguous

master
John Bent 2019-07-27 15:27:20 -06:00
parent d69957e55b
commit 629ff810b7
2 changed files with 17 additions and 4 deletions

View File

@ -939,6 +939,7 @@ static void InitTests(IOR_test_t *tests, MPI_Comm com)
params->testComm = com;
params->nodes = params->numTasks / tasksPerNode;
params->tasksPerNode = tasksPerNode;
params->packedTasks = QueryNodeMapping(com);
if (params->numTasks == 0) {
params->numTasks = size;
}
@ -1360,7 +1361,13 @@ static void TestIoSys(IOR_test_t *test)
}
if (params->reorderTasks) {
/* move two nodes away from writing node */
rankOffset = (2 * params->tasksPerNode) % params->numTasks;
int shift = 1;
if (params->packedTasks) {
shift = params->tasksPerNode;
} else {
shift = 1;
}
rankOffset = (2 * shift) % params->numTasks;
}
// update the check buffer
@ -1395,9 +1402,14 @@ static void TestIoSys(IOR_test_t *test)
/* Get rankOffset [file offset] for this process to read, based on -C,-Z,-Q,-X options */
/* Constant process offset reading */
if (params->reorderTasks) {
/* move taskPerNodeOffset nodes[1==default] away from writing node */
rankOffset = (params->taskPerNodeOffset *
params->tasksPerNode) % params->numTasks;
/* move one node away from writing node */
int shift = 1;
if (params->packedTasks) {
shift=params->tasksPerNode;
} else {
shift=1;
}
rankOffset = (params->taskPerNodeOffset * shift) % params->numTasks;
}
/* random process offset reading */
if (params->reorderTasksRandom) {

View File

@ -100,6 +100,7 @@ typedef struct
int numTasks; /* number of tasks for test */
int nodes; /* number of nodes for test */
int tasksPerNode; /* number of tasks per node */
int packedTasks; /* are the tasks round-robin across nodes or are they packed tightly*/
int repetitions; /* number of repetitions of test */
int repCounter; /* rep counter */
int multiFile; /* multiple files */