Hey everyone! Apologies if this isn't quite the ri...
# nextflow-plugins
q
Hey everyone! Apologies if this isn't quite the right channel for this, but we just published a new plugin: nf-slurm-no-memory ๐ŸŽ‰ ๐Ÿ”— https://github.com/bioinfo-pf-curie/nf-slurm-no-memory ๐Ÿ”— https://registry.nextflow.io/plugins/nf-slurm-no-memory@1.0.0 If you're working on HPC clusters where memory limits cannot be explicitly set (i.e. no
--mem
or
--mem-per-cpu
), this plugin may be exactly what you've been missing. Many clusters enforce a fixed memory-per-CPU ratio, and this plugin restores the ability for Nextflow to adapt automatically by computing the optimal CPU count for each process. Just add it to your config, set the executor to
slurm_no_memory
, and Nextflow will dynamically calculate the required CPUs based on the process memory request and the clusterโ€™s memory-per-CPU policy (default: 4 GB/CPU).
Copy code
plugins {
    id 'nf-slurm-no-memory@1.0.0'
}
a
Neat! What was missing with the
executor.perCpuMemAllocation
option?
Oh that's 25.12.0-edge, a pretty cutting edge feature!
q
In fact, this option works on high-performance computing (HPC) when the Slurm
--mem-per-cpu
option is available, but on some clusters, it is impossible to use the
--mem*
options.
a
Aahhh I see, so it's working the other way around, you specify the memory and it selects the correct number of CPUs?
q
In your pipeline, you can specify the CPU and memory, and the plugin will choose the maximum value between the number of CPU cores in the task and the amount of memory / the memPerTask parameter (default: 4 GB/CPU).
๐Ÿ™Œ 1
m
Fun idea
p
Side note, if you need to just _not submit memory request_s then you can do that directly in config, eg. as done here. Though it sounds like the above is quite a bit cleverer ๐Ÿ‘๐Ÿป
Copy code
withName: '.*' { memory = null }
q
Yes, that's a good idea, but in our context, if a process configuration requires 2 CPUs and 80 GB of memory, it will cause an error. Indeed, if the Slurm cluster reserves 2 CPUs and 8 GB of memory (4 GB per CPU), the process will be terminated by an Out of Memory (OOM) error.
๐Ÿ‘๐Ÿป 1