Got IOR shifting to work regardless of whether node/task mapping is round-robin or contiguous
parent
d69957e55b
commit
629ff810b7
20
src/ior.c
20
src/ior.c
|
@ -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) {
|
||||
|
|
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue