Skip to content

Commit

Permalink
Ensure checkmax is still used
Browse files Browse the repository at this point in the history
  • Loading branch information
jfy133 committed Oct 3, 2024
1 parent 9d7ce62 commit ce449f2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions conf/base.config
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@ process {
}
//MEGAHIT returns exit code 250 when running out of memory
withName: MEGAHIT {
cpus = { params.megahit_fix_cpu_1 ? 1 : 8 * task.attempt }
cpus = { params.megahit_fix_cpu_1 ? 1 : check_max(8 * task.attempt, 'cpus') }
memory = { check_max(40.GB * task.attempt, 'memory') }
time = { check_max(16.h * task.attempt, 'time') }
errorStrategy = { task.exitStatus in ((130..145) + 104 + 250) ? 'retry' : 'finish' }
}
//SPAdes returns error(1) if it runs out of memory (and for other reasons as well...)!
//exponential increase of memory and time with attempts, keep number of threads to enable reproducibility
withName: METASPADES {
cpus = { params.spades_fix_cpus != -1 ? params.spades_fix_cpus : 10 * task.attempt }
cpus = { params.spades_fix_cpus != -1 ? params.spades_fix_cpus : check_max(10 * task.attempt, 'cpus') }
memory = { check_max(64.GB * (2 ** (task.attempt - 1)), 'memory') }
time = { check_max(24.h * (2 ** (task.attempt - 1)), 'time') }
errorStrategy = { task.exitStatus in ((130..145) + 104 + 21 + 12 + 1) ? 'retry' : 'finish' }
maxRetries = 5
}
withName: METASPADESHYBRID {
cpus = { params.spadeshybrid_fix_cpus != -1 ? params.spadeshybrid_fix_cpus : 10 * task.attempt }
cpus = { params.spadeshybrid_fix_cpus != -1 ? params.spadeshybrid_fix_cpus : check_max(10 * task.attempt, 'cpus') }
memory = { check_max(64.GB * (2 ** (task.attempt - 1)), 'memory') }
time = { check_max(24.h * (2 ** (task.attempt - 1)), 'time') }
errorStrategy = { task.exitStatus in [143, 137, 21, 1] ? 'retry' : 'finish' }
Expand Down

0 comments on commit ce449f2

Please sign in to comment.