Skip to content

Commit d585c5d

Browse files
author
Ralph Castain
authored
Merge pull request #4291 from rhc54/topic/ppr
Correctly assign locales when mapping ppr
2 parents a3ac67b + d7d127b commit d585c5d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

orte/mca/rmaps/ppr/rmaps_ppr.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,8 +711,8 @@ static int assign_locations(orte_job_t *jdata)
711711
/* map the specified number of procs to each such resource on this node,
712712
* recording the locale of each proc so we know its cpuset
713713
*/
714-
cnt = 0;
715714
for (i=0; i < nobjs; i++) {
715+
cnt = 0;
716716
obj = opal_hwloc_base_get_obj_by_type(node->topology->topo,
717717
level, cache_level,
718718
i, OPAL_HWLOC_AVAILABLE);
@@ -723,6 +723,10 @@ static int assign_locations(orte_job_t *jdata)
723723
if (proc->name.jobid != jdata->jobid) {
724724
continue;
725725
}
726+
/* if we already assigned it, then skip */
727+
if (orte_get_attribute(&proc->attributes, ORTE_PROC_HWLOC_LOCALE, NULL, OPAL_PTR)) {
728+
continue;
729+
}
726730
nprocs_mapped++;
727731
cnt++;
728732
orte_set_attribute(&proc->attributes, ORTE_PROC_HWLOC_LOCALE, ORTE_ATTR_LOCAL, obj, OPAL_PTR);

0 commit comments

Comments
 (0)