Does SPMD always use all cores?
古いコメントを表示
So far as I know, parfor will not use all available cores if Matlab considers the task as not sufficiently heavy.
But does SPMD always use all available cores even if the task is small? It seems to me YES as far as I have tried.
I am working on the shared memory system. Due to the memory restriction, I cannot increase the size of each sub-task in order to increase the computational load. If SPMD can use all the cores regardless of the computational load, then it will be probably more suitable in my case, as SPMD will then not waste the computational ability of the hardwares. But if I finally resort to SPMD, then I will have to make a certain amount of changes to my code.
Any opinions are appreciated. Thank you.
2 件のコメント
Adam
2016 年 4 月 12 日
I've not really noticed parfor using anything less than the number of cores available within the opened Matlab pool, unless, of course, there aren't as many indices in the parfor loop as there are cores. I haven't studied it closely though.
Hanzhi Diao
2016 年 4 月 13 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Parallel for-Loops (parfor) についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!