Looking at <https://nf-co.re/docs/developing/compo...
# nostupidquestions
p
Looking at https://nf-co.re/docs/developing/components/gpu-modules, I became unsure - what is the correct way for a user/institutional config to flag the lack of GPUs?
m
If the pipeline uses the
-profile gpu
way, then we can fast fail on that. If it enables GPU parameter based, then I guess it will have to error at task run time ( let the executor accounting handle that I guess ).
p
But I don't want to fail 🙂
m
I've emailed support to see what they say about this situation
p
My recollection (and my reading of that page) says that dual-capability modules should check
task.accelarator
to see if they can expect to have the resource available (and also choose the right container image).
💯 1
So for a pipeline supporting GPU use of a model, it will be set e.g.
process.accelerator=1
💯 1
But in my institutional config, I want to override that with a
process.accelerator=0
.
But since the pipeline config is specific to the process, I'd also need to be.
m
Copy code
withName '.*' {
    accelerator = null
}
will do that, but then the module itself may break
p
Right, thanks, maybe that's usable. We can expect pipeline configs not to use the full names?
m
No, they will, but this is equivalent to a full name, and will override those too.
wait, no. modules.config is loaded after the institutional config
It's likely though that the accelerator if set will use the simple name so it affects all the processes.
p
My reading of https://docs.seqera.io/nextflow/config#selector-priority says there's no priority difference between different kinds of full names, and these all get included from the same context. I guess the actual order of inclusion might play a role?
m
it will according to my understanding. If they use the full name in the modules.config, then I don't think the catchall override will work, as it's in the same class, but my hope is that pipeline devs will use the simple name to set accelerator out of simplicity.
p
I forget, are pipelines expected to touch
modules.config
? My hunch is that the config I worry about is in
base.config
which should be read before institutional. Oh well, I'll see if I can make something up to try, thanks for the reminder.
m
Pipelines set a whole bunch of stuff in the modules.config, primarily prefixes, resource overrides, and I guess also parameter based enabling of gpu's
👍 1