-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.config
156 lines (131 loc) · 4.91 KB
/
base.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
// nf-config/base.config
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nextflow base config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A 'blank slate' config file, appropriate for general use on most high performance
compute environments. Assumes that all software is installed and available on
the PATH. Runs in `local` mode - all jobs will be run on the logged in environment.
----------------------------------------------------------------------------------------
*/
process {
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
errorStrategy = { task.exitStatus in ((130..145) + 104) ? 'retry' : 'finish' }
maxRetries = 3
maxErrors = '-1'
// Process-specific resource requirements
// NOTE - Please try and re-use the labels below as much as possible.
// These labels are used and recognised by default in DSL2 files hosted on nf-core/modules.
// If possible, it would be nice to keep the same label naming convention when
// adding in your local modules too.
// See https://www.nextflow.io/docs/latest/config.html#config-process-selectors
withLabel:process_single {
cpus = { check_max( 1 , 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_low {
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 12.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:process_medium {
cpus = { check_max( 6 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel:process_high {
cpus = { check_max( 12 * task.attempt, 'cpus' ) }
memory = { check_max( 72.GB * task.attempt, 'memory' ) }
time = { check_max( 16.h * task.attempt, 'time' ) }
}
withLabel:process_long {
time = { check_max( 20.h * task.attempt, 'time' ) }
}
withLabel:process_high_memory {
memory = { check_max( 200.GB * task.attempt, 'memory' ) }
}
withLabel:error_ignore {
errorStrategy = 'ignore'
}
withLabel:error_retry {
errorStrategy = 'retry'
maxRetries = 2
}
withName:CUSTOM_DUMPSOFTWAREVERSIONS {
cache = false
}
// Memory labels
withLabel:mem_4G {
memory = { check_max( 4.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 4.GB * task.attempt )}
}
withLabel:mem_8G {
memory = { check_max( 8.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 8.GB * task.attempt )}
}
withLabel:mem_16G {
memory = { check_max( 16.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 16.GB * task.attempt )}
}
withLabel:mem_32G {
memory = { check_max( 32.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 32.GB * task.attempt )}
}
withLabel:mem_64G {
memory = { check_max( 64.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 64.GB * task.attempt )}
}
withLabel:mem_128G {
memory = { check_max( 128.GB * task.attempt, 'memory' ) }
queue = { assign_queue ( 128.GB * task.attempt )}
}
// Time label
withLabel:time_10m {
time = { check_max( 10.m * task.attempt, 'time' ) }
}
withLabel:time_30m {
time = { check_max( 30.m * task.attempt, 'time' ) }
}
withLabel:time_1h {
time = { check_max( 1.h * task.attempt, 'time' ) }
}
withLabel:time_2h {
time = { check_max( 2.h * task.attempt, 'time' ) }
}
withLabel:time_4h {
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel:time_8h {
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel:time_12h {
time = { check_max( 12.h * task.attempt, 'time' ) }
}
withLabel:time_24h {
time = { check_max( 1.d * task.attempt, 'time' ) }
}
withLabel:time_24h {
time = { check_max( 2.d * task.attempt, 'time' ) }
}
}
def assign_queue (mem){
def queue = ""
switch ( mem ) {
case { it > 185.GB }:
queue = 'superhimem'
break
case { it > 61.4.GB }:
queue = 'veryhimem'
break
case { it > 30.72.GB }:
queue = 'himem'
break
default:
queue = 'all'
break
}
return queue
}