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);