O2 Framework limit number of threads

Hi Experts,

is there any option to limit the number of threads when running an O2 reconstruction workflow?
So to be concrete when running this workflow, lets say about half the cores?
workflow.txt (4.8 KB)

This never got answered in Limit parallelization for O2 workflows
@eulisse (recommended by @oschmidt)

Hi Felix. To me it is not quite clear what you mean by “threads”. A DPL workflow consists of a couple of interacting processes. The number of processes is defined by the topology.
There is no direct notion of a number of CPUs or processes that can be active at any moment in time.

In case you’d like to merely constrain the workflow onto a given limited number of CPU cores, taskset might be an option:
taskset -c 0-3 ./workflow.sh will execute the workflow using CPU cores 0 to 3 only. taskset -c 0 will necessarly linearize the whole thing.

Apart from that I am not sure that DPL has capabilities to constrain the number of processes which can be active at any moment in time. Some time ago, we discussed the possibility to execute the workflow in a strict topological order … but I don’t know if this is possible. I believe that @eulisse has more information.