Skip to content

Conversation

aaronpeikert
Copy link

See documentation https://slurm.schedmd.com/sbatch.html:

If the job can use more than one partition, specify their names in a comma separate list and the one offering earliest initiation will be used with no regard given to the partition name ordering (although higher priority partitions will be considered first).

The current behaviour works, however, it is surprising (only the first partition gets used):

resources <- list(partition = c("short", "long"))
# old, string gets repeated, slurm uses only first
sprintf(paste0("#SBATCH --partition='", resources$partition, "'"))
#> [1] "#SBATCH --partition='short'" "#SBATCH --partition='long'"
# new, comma seperated list
sprintf(paste0("#SBATCH --partition='", paste(resources$partition, collapse = ","), "'"))
#> [1] "#SBATCH --partition='short,long'"

Created on 2021-04-09 by the reprex package (v1.0.0)

See documentation https://slurm.schedmd.com/sbatch.html:
> If the job can use more than one partition, specify their names in a comma separate list and the one offering earliest initiation will be used with no regard given to the partition name ordering (although higher priority partitions will be considered first).
@aaronpeikert aaronpeikert changed the title allow for more than one partition allow for more than one partition in SLURM Apr 9, 2021
@mllg mllg deleted the branch mlr-org:master August 13, 2025 19:46
@mllg mllg closed this Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants