I want to execute multiple programs in parallel on physical cores, which each use a different number of cores.
Let's say I have the following programs:
p1.exe
(using 1 core), p2.exe
(using 2 cores), p4.exe
(4 cores), and p8.exe
(8 cores)
I currently call these in serial using subprocess.Popen
, but want to execute p1, p2 and p4 parallel and then p8, when using an 8 core machine. While executing p1, p2 and p4, I don't want p4 to run on e.g. cores 0, 1, 2, 3 while p2 or p1 use and of those.
Does pythons multiprocessing have an option to specify which cores to use, or is there a different way to achieve this?