Skip to content

Commit

Permalink
reoptimize for parallel cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
ktmeaton committed Jul 25, 2020
1 parent 012c1d9 commit 487ec9e
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions nextflow.config
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,26 @@ def check_max(obj, type) {
// --------------------------------------

process{
// Default minimal resources
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }

// Multi core, run 2 simultaneously
withName:snippy_pairwise{
cpus = Math.max(1, Math.floor(params.max_cpus / 2 ))
maxForks = Math.min(2, params.max_cpus)
}
// Multi core, run 2 simultaneously
withName:iqtree{
cpus = params.max_cpus
maxForks = 1
}
withName:eager{
cpus = params.max_cpus
maxForks = 1
}

errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' }
maxRetries = 3
maxErrors = '-1'
Expand All @@ -243,7 +259,5 @@ process{

executor{
name = 'local'
queueSize = 2
cpus = 2
memory = '6 GB'
queueSize = params.max_cpus
}

0 comments on commit 487ec9e

Please sign in to comment.