diff --git a/conf/uppmax.config b/conf/uppmax.config index 80f8991..b521934 100644 --- a/conf/uppmax.config +++ b/conf/uppmax.config @@ -11,25 +11,26 @@ singularity { def hostname = "sinfo --local -N -h | head -1 | cut -f1 -d' ' ".execute().text.trim() +// closure to create a suitable clusterOptions +def clusterOptionsCreator = { m -> + String base = "-A $params.project ${params.clusterOptions ?: ''}" + // Do not use -p node on irma or if a thin node/core is enough + if (m < 125.GB || hostname ==~ "i.*") { + return base + } + + if (m < 250.GB) { + return base + " -p node -C mem256GB " + } + + // Remaining cases use the largest available node (1 Tbyte for rackham, 512 Gbyte for others) + if (hostname ==~ "r.*") { + return base + " -p node -C mem1TB " + } + return base + " -p node -C mem512GB " +} + process { - // closure to create a suitable clusterOptions - def clusterOptionsCreator = { m -> - String base = "-A $params.project ${params.clusterOptions ?: ''}" - // Do not use -p node on irma or if a thin node/core is enough - if (m < 125.GB || hostname ==~ "i.*") { - return base - } - if (m < 250.GB) { - return base + " -p node -C mem256GB " - } - // Remaining cases use the largest available node (1 Tbyte for rackham, 512 Gbyte for others) - if (hostname ==~ "r.*") { - return base + " -p node -C mem1TB " - } - return base + " -p node -C mem512GB " - } - - executor = 'slurm' clusterOptions = { clusterOptionsCreator(task.memory) } }