-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
The definition of the methods.get_cpus_and_memory function is too specific and should be converted to more general.
metapipeline-DNA/config/methods.config
Lines 71 to 86 in b8a6347
| detect_cpus_and_memory = { | |
| if (params.partition ==~ /F\d*/) { | |
| def cpus = params.partition.replaceAll('F', '') as Integer | |
| // F-series 1:2 CPU:memory ratio | |
| def memory = 2 * cpus * 0.95 // 5% of memory is unavailable based on Slurm configuration | |
| return ['cpus': cpus, 'memory': memory] | |
| } else if (params.partition ==~ /M\d*/) { | |
| def cpus = params.partition.replaceAll('M', '') as Integer | |
| // M-series 1:16 CPU:memory ratio | |
| def memory = 16 * cpus * 0.95 // %5 of memory is unavailable based on Slurm configuration | |
| return ['cpus': cpus, 'memory': memory] | |
| } else { | |
| System.out.println("Failed to detect CPUs and memory for ${params.partition}. Using default values.") | |
| return [:] | |
| } | |
| } |
Options:
- Always require users to specify the number of cpus and memory per sample
- Use SLURM commands to get the number of cpus and memory per partition.
Metadata
Metadata
Assignees
Labels
No labels