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->testComm = com;
|
||||||
params->nodes = params->numTasks / tasksPerNode;
|
params->nodes = params->numTasks / tasksPerNode;
|
||||||
params->tasksPerNode = tasksPerNode;
|
params->tasksPerNode = tasksPerNode;
|
||||||
|
params->packedTasks = QueryNodeMapping(com);
|
||||||
if (params->numTasks == 0) {
|
if (params->numTasks == 0) {
|
||||||
params->numTasks = size;
|
params->numTasks = size;
|
||||||
}
|
}
|
||||||
|
@ -1360,7 +1361,13 @@ static void TestIoSys(IOR_test_t *test)
|
||||||
}
|
}
|
||||||
if (params->reorderTasks) {
|
if (params->reorderTasks) {
|
||||||
/* move two nodes away from writing node */
|
/* 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
|
// 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 */
|
/* Get rankOffset [file offset] for this process to read, based on -C,-Z,-Q,-X options */
|
||||||
/* Constant process offset reading */
|
/* Constant process offset reading */
|
||||||
if (params->reorderTasks) {
|
if (params->reorderTasks) {
|
||||||
/* move taskPerNodeOffset nodes[1==default] away from writing node */
|
/* move one node away from writing node */
|
||||||
rankOffset = (params->taskPerNodeOffset *
|
int shift = 1;
|
||||||
params->tasksPerNode) % params->numTasks;
|
if (params->packedTasks) {
|
||||||
|
shift=params->tasksPerNode;
|
||||||
|
} else {
|
||||||
|
shift=1;
|
||||||
|
}
|
||||||
|
rankOffset = (params->taskPerNodeOffset * shift) % params->numTasks;
|
||||||
}
|
}
|
||||||
/* random process offset reading */
|
/* random process offset reading */
|
||||||
if (params->reorderTasksRandom) {
|
if (params->reorderTasksRandom) {
|
||||||
|
|
|
@ -100,6 +100,7 @@ typedef struct
|
||||||
int numTasks; /* number of tasks for test */
|
int numTasks; /* number of tasks for test */
|
||||||
int nodes; /* number of nodes for test */
|
int nodes; /* number of nodes for test */
|
||||||
int tasksPerNode; /* number of tasks per node */
|
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 repetitions; /* number of repetitions of test */
|
||||||
int repCounter; /* rep counter */
|
int repCounter; /* rep counter */
|
||||||
int multiFile; /* multiple files */
|
int multiFile; /* multiple files */
|
||||||
|
|
Loading…
Reference in New Issue