Discussion:
CPU pining problem
Tsai Li Ming
2014-06-30 10:40:28 UTC
Permalink
Hi,

I’m testing cpu pinning with the "TaskPlugin=task/affinity” configured.

However, by submitting 1 tasks, it never respects the CPU ID given. It is always mapped to 0x2, regardless which CPU ID was given. Is this expected?

# srun --cpu_bind=verbose,map_cpu=0 date
cpu_bind=MASK - ltsai-dev-rhel7, task 0 0 [21874]: mask 0x2 set


However, if I submit 2 tasks and I ask it to bind to the first or first-second CPU, it worked:
# srun -n2 --cpu_bind=verbose,map_cpu=0 date
cpu_bind=MAP - ltsai-dev-rhel7, task 1 1 [22222]: mask 0x1 set
cpu_bind=MAP - ltsai-dev-rhel7, task 0 0 [22221]: mask 0x1 set

# srun -n2 --cpu_bind=verbose,map_cpu=0,1 date
cpu_bind=MAP - ltsai-dev-rhel7, task 0 0 [22398]: mask 0x1 set
cpu_bind=MAP - ltsai-dev-rhel7, task 1 1 [22399]: mask 0x2 set


Thanks!

Loading...