You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #158 about process binding not being properly restored is significantly mitigated in 2.5 since there are topology flags to avoid binding changes, or restrict them inside the current process binding.
For the record, the issue is that moving a thread to a different processor group during x86 discovery causes the process to be attached to multiple groups (at least the new and the previous one, even if there are no thread in the old one anymore). This can be observed with GetProcessGroupAffinity():
USHORT n, m[2];
n = 2;
GetProcessGroupAffinity(GetCurrentProcess(), &n, m);
printf("I am in %u groups %u %u\n", n, m[0], m[1]);
Process binding cannot be set anymore because SetProcessAffinityMask() requires a single process group. One way to bring the process back to a single group is with JobObject:
if we apply the above code twice with different groups (for instance if load 2 hwloc topologies), only the first one applies, the second job is placed in the hierarchy. if they are compatible, the smallest one is used. if they are not (different groups), the first one only is applied.
we cannot remove the process from the job anymore, it might restrict future binding changes in the application or if reloading another topology
job affinity can be changed after attaching a process, and it will impact the process affinity immediately (even if the new affinity is larger than the previous one).
It may mean that we'd have to remember the hwloc "job" during the entire process duration and reuse it later. But things might get crazy when we create another process since it'll end up in the same job (without knowing it?).
The text was updated successfully, but these errors were encountered:
Issue #158 about process binding not being properly restored is significantly mitigated in 2.5 since there are topology flags to avoid binding changes, or restrict them inside the current process binding.
For the record, the issue is that moving a thread to a different processor group during x86 discovery causes the process to be attached to multiple groups (at least the new and the previous one, even if there are no thread in the old one anymore). This can be observed with GetProcessGroupAffinity():
Process binding cannot be set anymore because SetProcessAffinityMask() requires a single process group. One way to bring the process back to a single group is with JobObject:
Important things to note/discuss:
It may mean that we'd have to remember the hwloc "job" during the entire process duration and reuse it later. But things might get crazy when we create another process since it'll end up in the same job (without knowing it?).
The text was updated successfully, but these errors were encountered: