Summary: | more than one task executed instead of 1 | ||
---|---|---|---|
Product: | Slurm | Reporter: | Yann <yann.sagon> |
Component: | User Commands | Assignee: | Director of Support <support> |
Status: | RESOLVED INFOGIVEN | QA Contact: | |
Severity: | 3 - Medium Impact | ||
Priority: | --- | ||
Version: | 20.02.4 | ||
Hardware: | Linux | ||
OS: | Linux | ||
Site: | Université de Genève | Alineos Sites: | --- |
Atos/Eviden Sites: | --- | Confidential Site: | --- |
Coreweave sites: | --- | Cray Sites: | --- |
DS9 clusters: | --- | HPCnow Sites: | --- |
HPE Sites: | --- | IBM Sites: | --- |
NOAA SIte: | --- | NoveTech Sites: | --- |
Nvidia HWinf-CS Sites: | --- | OCF Sites: | --- |
Recursion Pharma Sites: | --- | SFW Sites: | --- |
SNIC sites: | --- | Linux Distro: | --- |
Machine Name: | CLE Version: | ||
Version Fixed: | Target Release: | --- | |
DevPrio: | --- | Emory-Cloud Sites: | --- |
Description
Yann
2020-11-23 10:33:47 MST
Hello Yann, This is expected behavior. From https://slurm.schedmd.com/srun.html#OPT_cpus-per-task: "If -c (--cpus-per-task) is specified without -n, as many tasks will be allocated per node as possible while satisfying the -c restriction." So just specify -n to limit this default behavior. Thanks, -Michael Hello, many thanks for your prompt reply. Indeed I wasn't specifying the number of tasks and I thought it was 1 per default. Is this a new behavior? If I submit the same job on a partition which doesn't contains the flag "Shared=EXCLUSIVE" there is only one task created. Is this expected? Thanks (In reply to Yann from comment #3) > Indeed I wasn't specifying the number of tasks and I thought it was 1 per > default. Is this a new behavior? The default is n=1. But when you specify -c, it can override that default. > If I submit the same job on a partition which doesn't contains the flag > "Shared=EXCLUSIVE" there is only one task created. Is this expected? Yes. With EXCLUSIVE, you get the whole node. So the # of CPUs allocated is 16, and -c2 means that the number of tasks will increase to 8. Without EXCLUSIVE, you will probably only get 1 task, leading to 1 CPU allocated by default. On my system, -c2 makes it fail because there are not enough CPUs. Note that `scontrol show job` does not show the number of tasks increase, but `scontrol show steps` does. I'll go ahead and mark this as resolved. Feel free to reopen if you have further questions. Thanks! -Michael Thanks for your help. My comment about this functionality: I would say that for me it would have been more useful if the number of cpus per tasks would increases to fill the node instead of the number of tasks. In our use case the user wasn't using a MPI job and so it's multithreaded job was launched 8 times with 2 cores instead of once with 16 cores. Best |