Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Can Nextflow pipeline check the process executor type during running?

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 :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading