Community
cancel
Showing results for 
Search instead for 
Did you mean: 
forums_mp
Beginner
45 Views

Executables on specific cores?

For starters, I was intrigued by the thread 'how to run code on a specific CPU'. In an attempt to avoid muddling that thread I decided to start a new one.

That aside, lets assume I have two executables. S1 and S2. Now given a 2 processor 12 (6 cores/processor) core system.

Can I 'run' S1 on - lets say Core 0 of processor 1 and S2 on Cores, 1, 2 and 3 of processor 1?

Thanks


Mark

0 Kudos
1 Reply
gaston-hillar
Black Belt
45 Views

Mark,
You can set the processor affinity for each process.
You can use code to set the processor affinity or you can use the tools offered by the operating system to control which cores the process will be allowed to execute on.
In Windows 7, you can go to the Process in Task Manager, right-click on its name, select Set Affinity... and activate the checkboxes for the desired cores.
You have to check how each core number maps to the available logical cores, physical cores and the different physical microprocessors.
In Windows, you can use the CoreInfo utility. I've written an article a few months ago "Coreinfo v2.0: A Simple Utility to Understand the Manycore Complexity in Windows." This article might help you.
Hope this information helps.
Cheers,
Gaston Hillar
Reply