|
| 1 | + |
| 2 | +// Resource limits for different jobs |
| 3 | + |
| 4 | +// Process setting |
| 5 | + |
| 6 | +process { |
| 7 | + |
| 8 | + // Global cluster parameters |
| 9 | + cpus = { check_max( 1 * task.attempt, 'cpus' ) } |
| 10 | + memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
| 11 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
| 12 | + |
| 13 | + errorStrategy = { task.exitStatus in [143,137,140,7] ? 'retry' : 'finish' } |
| 14 | + maxRetries = 3 |
| 15 | + maxErrors = '-1' |
| 16 | + |
| 17 | + // Specific compute parameters for each process |
| 18 | + |
| 19 | + withLabel: short_serial { |
| 20 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
| 21 | + memory = { check_max( 8.GB * task.attempt, 'memory' ) } |
| 22 | + cpus = { check_max( 1 * task.attempt, 'cpus' ) } |
| 23 | + } |
| 24 | + withLabel: medium_serial { |
| 25 | + time = { check_max( 8.h * task.attempt, 'time' ) } |
| 26 | + memory = { check_max( 16.GB * task.attempt, 'memory' ) } |
| 27 | + cpus = { check_max( 1 * task.attempt, 'cpus' ) } |
| 28 | + } |
| 29 | + withLabel: long_serial { |
| 30 | + time = { check_max( 24.h * task.attempt, 'time' ) } |
| 31 | + memory = { check_max( 32.GB * task.attempt, 'memory' ) } |
| 32 | + cpus = { check_max( 1 * task.attempt, 'cpus' ) } |
| 33 | + } |
| 34 | + withLabel: short_parallel { |
| 35 | + time = { check_max( 2.h * task.attempt, 'time' ) } |
| 36 | + memory = { check_max( 24.GB * task.attempt, 'memory' ) } |
| 37 | + cpus = { check_max( 8 * task.attempt, 'cpus' ) } |
| 38 | + } |
| 39 | + withLabel: medium_parallel { |
| 40 | + time = { check_max( 8.h * task.attempt, 'time' ) } |
| 41 | + memory = { check_max( 64.GB * task.attempt, 'memory' ) } |
| 42 | + cpus = { check_max( 8 * task.attempt, 'cpus' ) } |
| 43 | + } |
| 44 | + withLabel: long_parallel { |
| 45 | + time = { check_max( 24.h * task.attempt, 'time' ) } |
| 46 | + memory = { check_max( 96.GB * task.attempt, 'memory' ) } |
| 47 | + cpus = { check_max( 8 * task.attempt, 'cpus' ) } |
| 48 | + } |
| 49 | + withLabel: extra_long_parallel { |
| 50 | + time = { check_max( 96.h * task.attempt, 'time' ) } |
| 51 | + memory = { check_max( 120.GB * task.attempt, 'memory' ) } |
| 52 | + cpus = { check_max( 8 * task.attempt, 'cpus' ) } |
| 53 | + } |
| 54 | + |
| 55 | +} |
| 56 | + |
| 57 | + |
| 58 | + |
0 commit comments