Skip to content

Commit 437f5b4

Browse files
author
Ralph Castain
committed
Fix map-by node and do-not-launch
1 parent 4944ba7 commit 437f5b4

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
@@ -118,10 +118,24 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
118118
orte_proc_t *dmn1;
119119
int i;
120120

121-
/* if we got back topology info from the first node, then we use
122-
* it as the "standard" for all other nodes unless they sent
123-
* back their own topology */
124-
if (1 < orte_process_info.num_procs) {
121+
/* if we are not launching, then we just assume that all
122+
* daemons share our topology */
123+
if (orte_do_not_launch) {
124+
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
125+
t = node->topology;
126+
for (i=1; i < orte_node_pool->size; i++) {
127+
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
128+
continue;
129+
}
130+
if (NULL == node->topology) {
131+
node->topology = t;
132+
}
133+
}
134+
} else if (1 < orte_process_info.num_procs) {
135+
/* if we got back topology info from the first node, then we use
136+
* it as the "standard" for all other nodes unless they sent
137+
* back their own topology */
138+
125139
/* find daemon.vpid = 1 */
126140
jdata = orte_get_job_data_object(ORTE_PROC_MY_NAME->jobid);
127141
if (NULL == (dmn1 = (orte_proc_t*)opal_pointer_array_get_item(jdata->procs, 1))) {
@@ -151,17 +165,6 @@ void orte_plm_base_daemons_reported(int fd, short args, void *cbdata)
151165
node->topology = t;
152166
}
153167
}
154-
} else if (orte_do_not_launch) {
155-
node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, 0);
156-
t = node->topology;
157-
for (i=1; i < orte_node_pool->size; i++) {
158-
if (NULL == (node = (orte_node_t*)opal_pointer_array_get_item(orte_node_pool, i))) {
159-
continue;
160-
}
161-
if (NULL == node->topology) {
162-
node->topology = t;
163-
}
164-
}
165168
}
166169

167170
/* 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
@@ -136,8 +136,7 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
136136
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
137137
"mca:rmaps: nprocs %s",
138138
ORTE_VPID_PRINT(nprocs));
139-
if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping) &&
140-
ORTE_MAPPING_BYNODE != ORTE_GET_MAPPING_POLICY(orte_rmaps_base.mapping)) {
139+
if (ORTE_MAPPING_GIVEN & ORTE_GET_MAPPING_DIRECTIVE(orte_rmaps_base.mapping)) {
141140
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
142141
"mca:rmaps mapping given - using default");
143142
map->mapping = orte_rmaps_base.mapping;
@@ -292,8 +291,6 @@ void orte_rmaps_base_map_job(int fd, short args, void *cbdata)
292291
"mca:rmaps[%d] binding not given - using bynuma", __LINE__);
293292
OPAL_SET_DEFAULT_BINDING_POLICY(jdata->map->binding, OPAL_BIND_TO_NUMA);
294293
}
295-
} else if (ORTE_MAPPING_BYNODE == mpol || ORTE_MAPPING_BYBOARD == mpol) {
296-
jdata->map->binding = OPAL_BIND_TO_NONE;
297294
} else if (nprocs <= 2) {
298295
/* if nothing was specified, then we default to a policy
299296
* based on number of procs and cpus_per_rank */

0 commit comments

Comments
 (0)