Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable task affinity in slurm.conf #42

Open
sjpb opened this issue Jul 22, 2020 · 1 comment
Open

Enable task affinity in slurm.conf #42

sjpb opened this issue Jul 22, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request operations Tweaks to make a better-operating cluster

Comments

@sjpb
Copy link
Collaborator

sjpb commented Jul 22, 2020

Currently there is no task launch plugin configured, which means srun's --cpu-bind option does not work.

See guidance under TaskPlugin on the slurm.conf manpage:

NOTE: It is recommended to stack task/affinity,task/cgroup together when configuring TaskPlugin, and setting TaskAffinity=no and ConstrainCores=yes in cgroup.conf. This setup uses the task/affinity plugin for setting the affinity of the tasks (which is better and different than task/cgroup) and uses the task/cgroup plugin to fence tasks into the specified resources, thus combining the best of both pieces.

@sjpb sjpb self-assigned this Jul 22, 2020
@sjpb sjpb added the enhancement New feature or request label Nov 3, 2020
@sjpb sjpb added the operations Tweaks to make a better-operating cluster label Feb 25, 2021
@houyushan
Copy link

houyushan commented Sep 7, 2022

The task launch plugin is configured:
slurm.conf : "TaskPlugin=task/affinity,task/cgroup",
cgroup.conf : "TaskAffinity=no ConstrainCores=yes"
but srun's --cpu-bind option does not work, and the job runs with only one CPU core。

info:
srun --cpu-bind=socket mpiexec -n 6 -genv I_MPI_DEBUG=4 /home/bt-mz.C.x

[0] MPI startup(): Rank Pid Node name Pin cpu
[0] MPI startup(): 0 597305 c2 {0}
[0] MPI startup(): 1 597306 c2 {0}
[0] MPI startup(): 2 597307 c2 {0}
[0] MPI startup(): 3 597308 c2 {0}
[0] MPI startup(): 4 597309 c2 {0}
[0] MPI startup(): 5 597310 c2 {0}

Has anyone ever encountered a similar problem, or what is the cause of this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request operations Tweaks to make a better-operating cluster
Projects
None yet
Development

No branches or pull requests

2 participants