I am running one Nextflow script in different environments (AWS batch, slurm…). I want to check if the process.executor is awsbatch during running. But I cannot call process directly. It raises the error No such variable: process. Are there any ways to check or print out the executor type for Nextflow pipeline job?
>Solution :
Inside a process instance (task), you can obtain this info through the $task.executor implicit variable. Check the example below:
process FOO {
debug true
script:
"""
echo $task.executor
"""
}
workflow {
FOO()
}
It outputs:
N E X T F L O W ~ version 23.02.0-edge
Launching `asd.nf` [naughty_yonath] DSL2 - revision: 2995f22831
executor > local (1)
[99/f57ab8] process > FOO [100%] 1 of 1 ✔
local