0

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?

Lukas
  • 45
  • 6
  • Does this answer your question? [Designate specific CPU for a process - python multiprocessing](https://stackoverflow.com/questions/36172101/designate-specific-cpu-for-a-process-python-multiprocessing) – Ahmed AEK Dec 14 '22 at 12:49
  • @AhmedAEK it's a good start, but I still need to find the indexes where the physical cores are located. I only found how to get the number of physical cores, but when specifying which cores to use, I still need to know which of them are actual physical ones – Lukas Dec 15 '22 at 11:40

0 Answers0