フィルターのクリア

Use both multi core CPUs

4 ビュー (過去 30 日間)
David
David 2015 年 3 月 4 日
回答済み: Edric Ellis 2015 年 3 月 5 日
Hi,
I have a two CPU multi core machine (16 cores each). I want to use a parfor loop on all 32 cores. But maxNumCompThreads gives me 16. In preferences I changed the maximum number of workers to 32, but when I open a parallel pool it still has only 16 workers. What do I need to configure to make use of all cores? If it matters my parfor loop is a perfect parallelisable task, i.e. no communication between iterations is needed.
Thanks for your help!
  1 件のコメント
Matt J
Matt J 2015 年 3 月 4 日

サインインしてコメントする。

採用された回答

Edric Ellis
Edric Ellis 2015 年 3 月 5 日
You need to edit the 'local' parallel profile to set the maximum number of workers to 32. See the doc. Once you've done that, you should be able to issue the following command:
parpool('local', 32)
and launch 32 workers.
Note that if MATLAB by default does not consider hyper-threaded cores, as these tend not to perform well for numerically intensive computations. So, you might well find that running 32 workers is actually slower than running 16, depending on the precise nature of your computation.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by