With taskset
, I can limit a process to run on a specific CPU.
I am submitting jobs through a load scheduling facility on a high performance cluster, and consequentially, when I submit the jobs I don't know:
- on what node they will run
- how many cores that node will have (it might be 16, 48, 64, ...)
- what cores specifically are available
- whether any other of my jobs are running on the same node
Cluster management complains I am using too many CPUs. This happens in library calls I am making, not in my own code. Is it possible to force my process to use a maximum of n CPUs, without specifying exactly which CPUs those are?