Programmatically pre-detect number of cores available to Parallel Computing Toolbox

Is there a way to detect the number of cores, i.e., the maximum number of non-oversubscribed workers that are available to a parallel pool in the Parallel Computing Toolbox, but without actually first opening a pool?

댓글 수: 2

Matt J
Matt J 2014년 3월 12일
편집: Matt J 2014년 3월 12일
Windows 7 64-bit, as it happens. However, I'm looking for a programmatic way within MATLAB to do it, i.e., so that it is platform-independent.

댓글을 달려면 로그인하십시오.

 채택된 답변

Try this:
c = parcluster('local'); % build the 'local' cluster object
nw = c.NumWorkers % get the number of workers
Of course, this is a maximum - the user might have specified in their parallel preferences to automatically open pools of a smaller size.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Parallel Computing Fundamentals에 대해 자세히 알아보기

질문:

2014년 3월 12일

댓글:

2014년 3월 12일

Community Treasure Hunt

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

Start Hunting!

Translated by