mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-25 17:29:55 +00:00
Merge pull request #226 from pontus/master
UPPMAX: Allow jobs needing more memory than thin nodes, pick up cluster info through slurm
This commit is contained in:
commit
33ae41bc91
1 changed files with 41 additions and 7 deletions
|
@ -12,25 +12,58 @@ singularity {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def hostname = "r1"
|
||||||
|
try {
|
||||||
|
hostname = "sinfo --local -N -h | grep -F -v CLUSTER: | head -1 | cut -f1 -d' ' ".execute().text.trim()
|
||||||
|
} catch (java.io.IOException e) {
|
||||||
|
System.err.println("WARNING: Could not run sinfo to determine current cluster, defaulting to rackham")
|
||||||
|
}
|
||||||
|
|
||||||
|
// 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 "
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Use mem1TB for remaining cases on rackham (no 512 Gbyte nodes)
|
||||||
|
if (hostname ==~ "r.*") {
|
||||||
|
return base + " -p node -C mem1TB "
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m > 500.GB) {
|
||||||
|
// Special case for snowy very fat node (only remaining case that's above 500 GB)
|
||||||
|
return base + " -p veryfat "
|
||||||
|
}
|
||||||
|
|
||||||
|
// Should only be cases for mem512GB left (snowy and bianca)
|
||||||
|
return base + " -p node -C mem512GB "
|
||||||
|
}
|
||||||
|
|
||||||
process {
|
process {
|
||||||
executor = 'slurm'
|
executor = 'slurm'
|
||||||
clusterOptions = { "-A $params.project ${params.clusterOptions ?: ''}" }
|
clusterOptions = { clusterOptionsCreator(task.memory) }
|
||||||
}
|
}
|
||||||
|
|
||||||
params {
|
params {
|
||||||
save_reference = true
|
save_reference = true
|
||||||
|
|
||||||
max_memory = 125.GB
|
max_memory = 500.GB
|
||||||
max_cpus = 16
|
max_cpus = 16
|
||||||
max_time = 240.h
|
max_time = 240.h
|
||||||
// illumina iGenomes reference file paths on UPPMAX
|
// illumina iGenomes reference file paths on UPPMAX
|
||||||
igenomes_base = '/sw/data/uppnex/igenomes/'
|
igenomes_base = '/sw/data/igenomes/'
|
||||||
}
|
}
|
||||||
|
|
||||||
def hostname = "hostname".execute().text.trim()
|
if (hostname ==~ "s[0-9][0-9]*") {
|
||||||
|
params.max_time = 700.h
|
||||||
if (hostname ==~ "b.*" || hostname ==~ "s.*") {
|
params.max_memory = 3880.GB
|
||||||
params.max_memory = 109.GB
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostname ==~ "i.*") {
|
if (hostname ==~ "i.*") {
|
||||||
|
@ -39,6 +72,7 @@ if (hostname ==~ "i.*") {
|
||||||
|
|
||||||
if (hostname ==~ "r.*") {
|
if (hostname ==~ "r.*") {
|
||||||
params.max_cpus = 20
|
params.max_cpus = 20
|
||||||
|
params.max_memory = 970.GB
|
||||||
}
|
}
|
||||||
|
|
||||||
profiles {
|
profiles {
|
||||||
|
|
Loading…
Reference in a new issue