Parellel computing toolbox speedup

Hello, I've got some computationally intensive problems to solve so i downloaded the parallel computing toolbox but when testing, parfor loops take longer than for loops even in large loops (for loop takes 55secs while parfor takes 60secs). I would think these loops are big enough to overcome the overhead costs of palatalization. I'm running an iMac with an i7 quad core and 32 gb ram. I'm not using a cluster, i'm trying to utilize all of my cores. Is there some sort of configuration I need to change? Might it be intel's hyperthreading causing a problem? Any input would be appriciated

5 件のコメント

Sean de Wolski
Sean de Wolski 2012 年 2 月 24 日
How many workers are you opening? Are your variables sliced? How much data is being transferred back and forth relative to computation time? Posting a small snippet of code might help us diagnose this as well.
Jonathan Sullivan
Jonathan Sullivan 2012 年 2 月 24 日
perhaps this for loop and be vectorized. The possible time savings through vectorization can be quite significant, depending on the code. If you post your code, maybe we can take a crack at it.
Walter Roberson
Walter Roberson 2012 年 2 月 24 日
_Potentially_ related: http://www.mathworks.com/matlabcentral/answers/30073-extremely-slow-script-execution-with-new-laptop
Sarah Wait Zaranek
Sarah Wait Zaranek 2012 年 3 月 26 日
Did you make sure to open up a matlab pool?
Jan
Jan 2012 年 3 月 27 日
4 very good comments. Actually good enough to be votable answers.

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

回答 (1 件)

Daniel Shub
Daniel Shub 2012 年 3 月 27 日

0 投票

Not all problems can be sped up with parallel processing on a single computer. MATLAB automatically utilizes all cores for a number of its standard functions. If your processing is not processor limited, or if MATLAB is already using all your processing power, the PCT will not help.

カテゴリ

ヘルプ センター および File ExchangeParallel for-Loops (parfor) についてさらに検索

質問済み:

2012 年 2 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by