You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/process.md
+17-4Lines changed: 17 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1293,13 +1293,26 @@ process foo {
1293
1293
}
1294
1294
```
1295
1295
1296
-
In the above example the {ref}`process-memory` and execution {ref}`process-time` limits are defined dynamically. The first time the process is executed the `task.attempt` is set to `1`, thus it will request a two GB of memory and one hour of maximum execution time.
1296
+
In the above example the {ref}`process-memory` and execution {ref}`process-time` limits are defined dynamically. The first time the process is executed the `task.attempt` is set to `1`, thus it will request 2 GB of memory and 1 hour of walltime.
1297
1297
1298
-
If the task execution fail reporting an exit status in the range between 137 and 140, the task is re-submitted (otherwise terminates immediately). This time the value of`task.attempt`is `2`, thus increasing the amount of the memory to four GB and the time to 2 hours, and so on.
1298
+
If the task execution fails with an exit status between 137 and 140, the task is re-executed; otherwise, the run is terminated immediately. The re-executed task will have`task.attempt`set to `2`, and will request 4 GB of memory and 2 hours of walltime.
1299
1299
1300
-
The directive {ref}`process-maxretries` set the maximum number of time the same task can be re-executed.
1300
+
The {ref}`process-maxretries` directive sets the maximum number of times the same task can be re-executed.
1301
+
1302
+
:::{tip}
1303
+
Directives with named arguments, such as `accelerator` and `disk`, must use a more verbose syntax when they are dynamic. For example:
1304
+
1305
+
```nextflow
1306
+
// static request
1307
+
disk 375.GB, type: 'local-ssd'
1308
+
1309
+
// dynamic request
1310
+
disk { [request: 375.GB * task.attempt, type: 'local-ssd'] }
1311
+
```
1312
+
:::
1301
1313
1302
1314
### Dynamic task resources with previous execution trace
1315
+
1303
1316
:::{versionadded} 24.10.0
1304
1317
:::
1305
1318
@@ -1317,8 +1330,8 @@ process foo {
1317
1330
"""
1318
1331
}
1319
1332
```
1320
-
In the above example, the {ref}`process-memory` is set according to previous trace record metrics. In the first attempt, when no trace metrics are available, it is set to one GB. In the subsequent attempts, it doubles the previously allocated memory. See {ref}`trace-report` for more information about trace records.
1321
1333
1334
+
In the above example, the {ref}`process-memory` is set according to previous trace record metrics. In the first attempt, when no trace metrics are available, it is set to 1 GB. In each subsequent attempt, the requested memory is doubled. See {ref}`trace-report` for more information about trace records.
0 commit comments