Skip to content

Commit b7928c2

Browse files
author
rhc54
committed
Merge pull request #1693 from rhc54/topic/eval2
Fix the dist mapper option
2 parents 927d3f4 + 30aaf78 commit b7928c2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

orte/mca/rmaps/base/rmaps_base_frame.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ static int orte_rmaps_base_open(mca_base_open_flag_t flags)
253253
orte_rmaps_base.slot_list = NULL;
254254
orte_rmaps_base.mapping = 0;
255255
orte_rmaps_base.ranking = 0;
256+
orte_rmaps_base.device = NULL;
256257

257258
/* if a topology file was given, then set our topology
258259
* from it. Even though our actual topology may differ,
@@ -614,9 +615,10 @@ int orte_rmaps_base_set_mapping_policy(orte_mapping_policy_t *policy,
614615
}
615616

616617
opal_output_verbose(5, orte_rmaps_base_framework.framework_output,
617-
"%s rmaps:base set policy with %s",
618+
"%s rmaps:base set policy with %s device %s",
618619
ORTE_NAME_PRINT(ORTE_PROC_MY_NAME),
619-
(NULL == inspec) ? "NULL" : inspec);
620+
(NULL == inspec) ? "NULL" : inspec,
621+
(NULL == device) ? "NULL" : "NONNULL");
620622

621623
if (NULL == inspec) {
622624
ORTE_SET_MAPPING_POLICY(tmp, ORTE_MAPPING_BYSOCKET);
@@ -719,12 +721,14 @@ int orte_rmaps_base_set_mapping_policy(orte_mapping_policy_t *policy,
719721
* we need to treat those hwthreads as separate cpus
720722
*/
721723
opal_hwloc_use_hwthreads_as_cpus = true;
722-
} else if ( NULL != device && 0 == strncasecmp(spec, "dist", len)) {
724+
} else if (0 == strncasecmp(spec, "dist", len)) {
723725
if (NULL != rmaps_dist_device) {
724726
if (NULL != (pch = strchr(rmaps_dist_device, ':'))) {
725727
*pch = '\0';
726728
}
727-
*device = strdup(rmaps_dist_device);
729+
if (NULL != device) {
730+
*device = strdup(rmaps_dist_device);
731+
}
728732
ORTE_SET_MAPPING_POLICY(tmp, ORTE_MAPPING_BYDIST);
729733
} else {
730734
orte_show_help("help-orte-rmaps-base.txt", "device-not-specified", true);

0 commit comments

Comments
 (0)