Remove executor dependency from accelerator directive#2181
Conversation
The accelerator directive should not be conditioned on task.executor. Pipelines must remain portable across executors; gating GPU resource requests on a hardcoded executor allowlist breaks that contract. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Newer version of the nf-core template is available. Your pipeline is using an old version of the nf-core template: 3.5.1. For more documentation on how to update your pipeline, please see the nf-core documentation and Synchronisation documentation. |
|
|
@famosab can you take a look when you have time. IIRC this was added after some issues on the M3 cluster |
|
Reasoning is if a cluster uses a dedicated gpu queue setting the accelerator to anything makes not sense, that is why it was added like this. I am fine with removing it here and just having that in my cluster config but I thought it should be written down and set to a sensible default somewhere.
|
|
I believe there must be a better way than just setting it to 4 here, it would want to at least easily support gpu queues in clusters that have these without the user needing to set it up. But I can see that hardcoding a list of executors does not make sense. |
Summary
acceleratordirective forPARABRICKS_FQ2BAMis currently gated on a hardcoded list of executors (awsbatch,google-batch,hq,k8s). This breaks the portability contract of Nextflow pipelines: the same process should run consistently across executors, and GPU resource requirements are a property of the task, not of where it runs.acceleratoris silently set tonulland the GPU request is dropped — leading to either failures or jobs running on CPU-only nodes without warning.acceleratoran unconditional value inconf/base.config,conf/test.config, and the example indocs/usage.md. Users who need executor-specific behavior can still override it in a custom config, which is the standard Nextflow extension point.Note for reviewers
docs/usage.md:185still describes the old executor-conditional behavior in prose ("The accelerator directive is added automatically for the executors ..."). That paragraph is now stale and should be rewritten in a follow-up (or here if preferred).Test plan
devPARABRICKS_FQ2BAMruns on a non-allowlisted executor with GPUs and picks up the directivetest.config) still launches correctly withaccelerator = 1🤖 Generated with Claude Code