Could I specify which CPU core that Matlab instance will use??

조회 수: 11 (최근 30일)
I knew that Matlab has parallels toolbox which will make Matlab use multiple CPU core but since I don't want to modify my code because I relatively new to Matlab and this project really needs to finish soon. so I want to know if I can choose which CPU core that my Matlab instances will use. For example, if I open 2 Matlab that mean I want these Matlab instances to use sperate CPU core.
Thank you

채택된 답변

Walter Roberson
Walter Roberson 2017년 6월 29일
That is outside the scope of MATLAB and is handled by the operating system.
If you are using MS Windows you can set processor affinity after the process is running; see https://technet.microsoft.com/en-us/library/ee851672.aspx
Normally the operating system dynamically assigns cores as required, and avoids assigning extra work to busy cores if there are free cores. Typically setting processor affinity is only needed for accounting / management purposes (e.g., one group might have contributed to the funding under the priviso that they get access to a minimum number of cores.) Sometimes it can make a bit of a difference to assign to a core that is on a board that has special hardware properties -- for example interrupt latency might be lower if you assign the handler process to the board that has the device interface attached. Or sometimes difference CPUs are different models and that might make some kind of difference.
But typically you do not need to set affinity.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Processor Software에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by