Skip to content
This repository was archived by the owner on Sep 30, 2022. It is now read-only.

Commit 7c47cf2

Browse files
author
Ralph Castain
committed
Fix map-by node and do-not-launch
(cherry picked from commit open-mpi/ompi@437f5b4)
1 parent 58bd1f6 commit 7c47cf2

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

orte/mca/plm/base/plm_base_launch_support.c

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,24 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
8585
orte_proc_t *dmn1;
8686
int i;
8787

88-
/* if we got back topology info from the first node, then we use
89-
* it as the "standard" for all other nodes unless they sent
90-
* back their own topology */
91-
if (1 < orte_process_info.num_procs) {
88+
/* if we are not launching, then we just assume that all
89+
* daemons share our topology */
90+
if (orte_do_not_launch) {
91+
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
92+
t = node->topology;
93+
for (i=1; i < orte_node_pool->size; i++) {
94+
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
95+
continue;
96+
}
97+
if (NULL == node->topology) {
98+
node->topology = t;
99+
}
100+
}
101+
} else if (1 < orte_process_info.num_procs) {
102+
/* if we got back topology info from the first node, then we use
103+
* it as the "standard" for all other nodes unless they sent
104+
* back their own topology */
105+
92106
/* find daemon.vpid = 1 */
93107
jdata = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid);
94108
if (NULL == (dmn1 = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, 1))) {
@@ -117,17 +131,6 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
117131
node->topology = t;
118132
}
119133
}
120-
} else if (orte_do_not_launch) {
121-
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
122-
t = node->topology;
123-
for (i=1; i < orte_node_pool->size; i++) {
124-
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
125-
continue;
126-
}
127-
if (NULL == node->topology) {
128-
node->topology = t;
129-
}
130-
}
131134
}
132135

133136
/* if this is an unmanaged allocation, then set the default

orte/mca/rmaps/base/rmaps_base_map_job.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,7 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
110110
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
111111
"mca:rmaps: nprocs %s",
112112
ORTE_VPID_PRINT(nprocs));
113-
if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping) &&
114-
ORTE_MAPPING_BYNODE != ORTE_GET_MAPPING_POLICY(orte_rmaps_base.mapping)) {
113+
if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) {
115114
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
116115
"mca:rmaps mapping given - using default");
117116
map->mapping = orte_rmaps_base.mapping;
@@ -269,8 +268,6 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
269268
} else if (ORTE_MAPPING_BYNUMA == mpol) {
270269
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
271270
}
272-
} else if (ORTE_MAPPING_BYNODE == mpol || ORTE_MAPPING_BYBOARD == mpol) {
273-
jdata->map->binding = OPAL_BIND_TO_NONE;
274271
} else if (nprocs <= 2) {
275272
/* if nothing was specified, then we default to a policy
276273
* based on number of procs and cpus_per_rank */

0 commit comments

Comments
 (0)