Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added another example for dynamic-task-resources #5628

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/process.md
Original file line number Diff line number Diff line change
Expand Up @@ -1303,6 +1303,24 @@ If the task execution fail reporting an exit status in the range between 137 and

The directive {ref}`process-maxretries` set the maximum number of time the same task can be re-executed.

A more elaborate example:

```nextflow
process foo {
memory {
def baseMem = 16.GB
def additionalMem = input_file.size() / 1e9
baseMem + (additionalMem * task.attempt).GB
}

input:
path input_file
}
```

In this example, the minimum memory is 16 GB. The memory will increase depending on the size of `input_file`, and the number of attempts (`task.attempt`). Note: `input_file.size()` must be converted to bytes in order to perform calculations (e.g., to prevent `Unknown method invocation div on Long type` errors).


### Dynamic task resources with previous execution trace
:::{versionadded} 24.10.0
:::
Expand Down
Loading