1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-25 17:29:55 +00:00

Modularised error handling strategy to per pipeline basis

This commit is contained in:
lquayle88 2022-09-16 17:29:08 +01:00
parent c9c4d02f0d
commit 55971bb94d
5 changed files with 41 additions and 14 deletions

View file

@ -15,6 +15,14 @@
process { process {
// error and retry handling
errorStrategy = { task.exitStatus in [143,137,104,134,139,140] ? 'retry' : 'finish' }
maxRetries = 2
// process labels
withLabel:process_low { withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) } cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 4.GB * task.attempt, 'memory' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) }
@ -72,3 +80,4 @@ def check_max(obj, type) {
} }
} }
} }

View file

@ -15,6 +15,14 @@
process { process {
// error and retry handling
errorStrategy = { task.exitStatus in [143,137,104,134,139,140] ? 'retry' : 'finish' }
maxRetries = 2
// process labels
withLabel:process_low { withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) } cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 4.GB * task.attempt, 'memory' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) }
@ -72,3 +80,4 @@ def check_max(obj, type) {
} }
} }
} }

View file

@ -15,6 +15,14 @@
process { process {
// error and retry handling
errorStrategy = { task.exitStatus in [143,137,104,134,139,140] ? 'retry' : 'finish' }
maxRetries = 2
// process labels
withLabel:process_low { withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) } cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 4.GB * task.attempt, 'memory' ) } memory = { check_max( 4.GB * task.attempt, 'memory' ) }

View file

@ -15,6 +15,11 @@
process { process {
// error and retry handling
errorStrategy = { task.exitStatus in [143,137,104,134,139,140,247] ? 'retry' : 'finish' }
maxRetries = 2
// process labels // process labels

View file

@ -28,16 +28,6 @@ params {
} }
// container engine
singularity {
enabled = true
autoMounts = true
}
// hpc configuration specific to ShARC // hpc configuration specific to ShARC
process { process {
@ -49,9 +39,15 @@ process {
queue = { task.time <= 6.h ? 'shortint.q' : 'all.q' } queue = { task.time <= 6.h ? 'shortint.q' : 'all.q' }
clusterOptions = { "-l rmem=${task.memory.toGiga()}G" } clusterOptions = { "-l rmem=${task.memory.toGiga()}G" }
// error and retry handling }
errorStrategy = { task.exitStatus in [143,137,104,134,139,140] ? 'retry' : 'finish' }
maxRetries = 2 // container engine
singularity {
enabled = true
autoMounts = true
} }