-
Notifications
You must be signed in to change notification settings - Fork 117
[bugfix] Pass explicitly the --cpus-per-task option to srun for Slurm >= 22.05
#2656
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
Conversation
vkarak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have the job so you can set the --cpus-per-task based on the job's value, from job.num_cpus_per_task. If it's None, you simply don't add the option. Also, I would also suggest to check the srun --version during the initialization of the launcher and emit this option only if it is greater than 22.05.
I thought about this but I think it wouldn't work if the user is setting the option from the cli with |
--cpus-per-task option to srun for Slurm >= 22.05
For Slurm version >= 22.05 we pass explicitly
--cpus-per-tasktosrunifnum_cpus_per_taskis set. For older versions we simply emit thesruncommand. If we cannot get the version of Slurm we also pass the option since it shouldn't hurt in theory for older versions.Fixes #2655 .