From fab60dff00f4b94d53ea3b4cd52bf1ae8b70a0b6 Mon Sep 17 00:00:00 2001 From: aaronpeikert Date: Fri, 9 Apr 2021 10:23:40 +0200 Subject: [PATCH] allow for more than one partition 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). --- inst/templates/slurm-simple.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inst/templates/slurm-simple.tmpl b/inst/templates/slurm-simple.tmpl index 4fb0a4ab..2c02faeb 100644 --- a/inst/templates/slurm-simple.tmpl +++ b/inst/templates/slurm-simple.tmpl @@ -30,7 +30,7 @@ log.file = fs::path_expand(log.file) #SBATCH --ntasks=1 #SBATCH --cpus-per-task=<%= resources$ncpus %> #SBATCH --mem-per-cpu=<%= resources$memory %> -<%= if (!is.null(resources$partition)) sprintf(paste0("#SBATCH --partition='", resources$partition, "'")) %> +<%= if (!is.null(resources$partition)) sprintf(paste0("#SBATCH --partition='", paste(resources$partition, collapse = ","), "'")) %> <%= if (array.jobs) sprintf("#SBATCH --array=1-%i", nrow(jobs)) else "" %> ## Initialize work environment like