Commit 4887d09
shell: fix hwloc_distrib() usage in affinity plugin
Problem: The job shell uses hwloc_distrib() incorrectly to distribute
cores to tasks when cpu-affinity=per-task is specified, resulting in
strange, uneven distribution of cores to tasks.
Using the source for hwloc-distrib(1) as a reference, distribute cores
to tasks by creating a separate hwloc_obj_t "root" per core in the
current topology, then calling hwloc_distrib() explicitly with those
roots. This seems to force the even distribution of cores to tasks
that is expected.
Fixes #45251 parent 6c8a176 commit 4887d09
1 file changed
+22
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
| 66 | + | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
68 | 70 | | |
69 | 71 | | |
70 | | - | |
| 72 | + | |
| 73 | + | |
71 | 74 | | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
75 | | - | |
76 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
77 | 92 | | |
78 | 93 | | |
79 | 94 | | |
80 | 95 | | |
81 | | - | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
82 | 99 | | |
83 | 100 | | |
84 | 101 | | |
| |||
0 commit comments