From d7d127b9b568c5a4f5307ec7ea980026fb34801b Mon Sep 17 00:00:00 2001 From: Ralph Castain Date: Tue, 3 Oct 2017 03:03:56 -0700 Subject: [PATCH] Correctly assign locales when mapping ppr Signed-off-by: Ralph Castain --- orte/mca/rmaps/ppr/rmaps_ppr.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/orte/mca/rmaps/ppr/rmaps_ppr.c b/orte/mca/rmaps/ppr/rmaps_ppr.c index cf85ae05b8..fc5938d27b 100644 --- a/orte/mca/rmaps/ppr/rmaps_ppr.c +++ b/orte/mca/rmaps/ppr/rmaps_ppr.c @@ -711,8 +711,8 @@ static int assign_locations(orte_job_t *jdata) /* map the specified number of procs to each such resource on this node, * recording the locale of each proc so we know its cpuset */ - cnt = 0; for (i=0; i < nobjs; i++) { + cnt = 0; obj = opal_hwloc_base_get_obj_by_type(node->topology->topo, level, cache_level, i, OPAL_HWLOC_AVAILABLE); @@ -723,6 +723,10 @@ static int assign_locations(orte_job_t *jdata) if (proc->name.jobid != jdata->jobid) { continue; } + /* if we already assigned it, then skip */ + if (orte_get_attribute(&proc->attributes, ORTE_PROC_HWLOC_LOCALE, NULL, OPAL_PTR)) { + continue; + } nprocs_mapped++; cnt++; orte_set_attribute(&proc->attributes, ORTE_PROC_HWLOC_LOCALE, ORTE_ATTR_LOCAL, obj, OPAL_PTR);