diff --git a/conf/base.config b/conf/base.config index af045fc9..b0d9e26e 100644 --- a/conf/base.config +++ b/conf/base.config @@ -35,8 +35,8 @@ process { // Assemblies will first try to adjust themselves to a parallel execution // If it is not possible, then it waits to use all the resources allowed withLabel:process_assembly { - cpus = { if (task.attempt == 1) { params.start_asm_cpus } else { params.max_cpus } } - memory = { if (task.attempt == 1) { params.start_asm_mem } else { params.max_memory } } + cpus = { if (task.attempt == 1) { check_max( params.start_asm_cpus, 'cpus' ) } else { params.max_cpus } } + memory = { if (task.attempt == 1) { check_max( params.start_asm_mem , 'memory' ) } else { params.max_memory } } // retry at least once to try it with full resources errorStrategy = { task.exitStatus in [1,21,143,137,104,134,139,247] ? 'retry' : 'finish' } @@ -48,9 +48,9 @@ process { def quast_mem = ((params.start_asm_mem / 2) > 6.GB) ? (params.start_asm_mem / 2) : 6.GB def quast_cpus = ((params.start_asm_cpus / 2) > 4 ) ? (params.start_asm_mem / 2) : 4 withName:quast { - cpus = { if (task.attempt == 1) { quast_cpus } else { params.max_cpus } } - memory = { if (task.attempt == 1) { quast_mem } else { params.max_memory } } - time = { if (task.attempt == 1) { check_max( 12.h * task.attempt, 'time' ) } else { params.max_time } } + cpus = { if (task.attempt == 1) { check_max( params.quast_cpus, 'cpus' ) } else { params.max_cpus } } + memory = { if (task.attempt == 1) { check_max( params.quast_mem , 'memory' ) } else { params.max_memory } } + time = { if (task.attempt == 1) { check_max( 12.h * task.attempt, 'time' ) } else { params.max_time } } // retry at least once to try it with full resources errorStrategy = { task.exitStatus in [21,143,137,104,134,139,247] ? 'retry' : 'finish' }