Following Julian's suggestion about better naming
parent
b2d486f749
commit
0ffec67d2b
18
src/ior.c
18
src/ior.c
|
@ -939,7 +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);
|
params->tasksBlockMapping = QueryNodeMapping(com);
|
||||||
if (params->numTasks == 0) {
|
if (params->numTasks == 0) {
|
||||||
params->numTasks = size;
|
params->numTasks = size;
|
||||||
}
|
}
|
||||||
|
@ -1361,11 +1361,9 @@ 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 */
|
||||||
int shift = 1;
|
int shift = 1; /* assume a by-node (round-robin) mapping of tasks to nodes */
|
||||||
if (params->packedTasks) {
|
if (params->tasksBlockMapping) {
|
||||||
shift = params->tasksPerNode;
|
shift = params->tasksPerNode; /* switch to by-slot (contiguous block) mapping */
|
||||||
} else {
|
|
||||||
shift = 1;
|
|
||||||
}
|
}
|
||||||
rankOffset = (2 * shift) % params->numTasks;
|
rankOffset = (2 * shift) % params->numTasks;
|
||||||
}
|
}
|
||||||
|
@ -1403,11 +1401,9 @@ static void TestIoSys(IOR_test_t *test)
|
||||||
/* Constant process offset reading */
|
/* Constant process offset reading */
|
||||||
if (params->reorderTasks) {
|
if (params->reorderTasks) {
|
||||||
/* move one node away from writing node */
|
/* move one node away from writing node */
|
||||||
int shift = 1;
|
int shift = 1; /* assume a by-node (round-robin) mapping of tasks to nodes */
|
||||||
if (params->packedTasks) {
|
if (params->tasksBlockMapping) {
|
||||||
shift=params->tasksPerNode;
|
shift=params->tasksPerNode; /* switch to a by-slot (contiguous block) mapping */
|
||||||
} else {
|
|
||||||
shift=1;
|
|
||||||
}
|
}
|
||||||
rankOffset = (params->taskPerNodeOffset * shift) % params->numTasks;
|
rankOffset = (params->taskPerNodeOffset * shift) % params->numTasks;
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +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 tasksBlockMapping; /* are the tasks in contiguous blocks across nodes or round-robin */
|
||||||
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 */
|
||||||
|
|
|
@ -2067,11 +2067,13 @@ mdtest_results_t * mdtest_run(int argc, char **argv, MPI_Comm world_com, FILE *
|
||||||
VERBOSE(3,-1,"main (before display_freespace): testdirpath is '%s'", testdirpath );
|
VERBOSE(3,-1,"main (before display_freespace): testdirpath is '%s'", testdirpath );
|
||||||
|
|
||||||
if (rank == 0) display_freespace(testdirpath);
|
if (rank == 0) display_freespace(testdirpath);
|
||||||
int packedByNode = QueryNodeMapping(testComm);
|
int tasksBlockMapping = QueryNodeMapping(testComm);
|
||||||
|
|
||||||
/* set the shift to mimic IOR and shift by procs per node */
|
/* set the shift to mimic IOR and shift by procs per node */
|
||||||
if (nstride > 0) {
|
if (nstride > 0) {
|
||||||
if ( nodeCount > 1 && packedByNode ) {
|
if ( nodeCount > 1 && tasksBlockMapping ) {
|
||||||
|
/* the user set the stride presumably to get the consumer tasks on a different node than the producer tasks
|
||||||
|
however, if the mpirun scheduler placed the tasks by-slot (in a contiguous block) then we need to adjust the shift by ppn */
|
||||||
nstride *= tasksPerNode;
|
nstride *= tasksPerNode;
|
||||||
}
|
}
|
||||||
VERBOSE(0,5,"Shifting ranks by %d for each phase.", nstride);
|
VERBOSE(0,5,"Shifting ranks by %d for each phase.", nstride);
|
||||||
|
|
Loading…
Reference in New Issue