mirror of
https://github.com/MillironX/nf-configs.git
synced 2024-11-11 04:23:10 +00:00
Use node queue when more memory than thin nodes have
This commit is contained in:
parent
71a97ba316
commit
c5070f3eba
1 changed files with 28 additions and 5 deletions
|
@ -9,25 +9,48 @@ singularity {
|
||||||
enabled = true
|
enabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def hostname = "hostname".execute().text.trim()
|
||||||
|
|
||||||
process {
|
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'
|
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 = 970.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/uppnex/igenomes/'
|
||||||
}
|
}
|
||||||
|
|
||||||
def hostname = "hostname".execute().text.trim()
|
if (hostname ==~ "b.*") {
|
||||||
|
params.max_memory = 500.GB
|
||||||
|
}
|
||||||
|
|
||||||
if (hostname ==~ "b.*" || hostname ==~ "s.*") {
|
if (hostname ==~ "s.*") {
|
||||||
params.max_memory = 109.GB
|
params.max_memory = 500.GB
|
||||||
|
params.max_time = 700.h
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hostname ==~ "i.*") {
|
if (hostname ==~ "i.*") {
|
||||||
|
|
Loading…
Reference in a new issue