Hello everyone, is there an easy way to change the...
# airrflow
g
Hello everyone, is there an easy way to change the number of cores/threads the pipeline uses, or do I have to specify it for each command independently in a custom.config file? thanks!
At the moment, as a workaround I made a custom.config file that modifies the processes labels as follows:
Copy code
process{
  errorStrategy = 'terminate'
  withLabel:process_low {
    cpus   = { 32 * task.attempt}
    memory = { 64.GB * task.attempt}
    time   = { 6.h * task.attempt}
  }
  withLabel:process_medium {
    cpus   = { 32 * task.attempt}
    memory = { 64.GB * task.attempt }
    time   = { 8.h * task.attempt }
  }
  withLabel:process_high {
    cpus   = { 32 }
    memory = { 64.GB  }
    time   = { 10.h * task.attempt }
  }
}
g
Hi @Giulio Isacchini, it is possible to limit the resources for all the processes with this config file:
Copy code
process {
    resourceLimits = [ memory: 16.GB, time: 72.h, cpus: 8 ]
}
If you’d like to set up this for all your runs, you can also store this config file under your home directory, stored in this path with the name “config”
$HOME/.nextflow/config
g
thanks! My hope was the opposite: to increase the resources for a specific job (igblastn was running only on two cores). The trick above does the job, but I am not sure if there are alternative ways
g
ah sorry I misunderstood, this is how to increase it for a process:
Copy code
process{
  withName:CHANGEO_ASSIGNGENES {
    cpus = 10
    memory = 64.GB
    time = 10.h
  }
}
Basically specifying “withName” instead of “withLabel”and the process name, the rest works the same way. If you’re not using the ” * task.attempt” there’s no need for the curly brackets any more.
g
ok great thanks!
👍 1