spmd-parfor
2 ビュー (過去 30 日間)
古いコメントを表示
Hello,
i am trying to use PCT for a large for loop which uses a large data set used in ultrasound medical imaging. the loop run faster when spmd is used but takes more time than the original one when parfor is used. Again for some of my codes parfor is fater
is there any rule of thumb regarding the use of spmd or parfor?
-OBLI
0 件のコメント
回答 (1 件)
Jill Reese
2012 年 5 月 31 日
Generally speaking, spmd is used when you need communication to occur between workers in the matlabpool. Another difference is that labindex provides the index of each worker in the pool when used within spmd. In parfor, labindex is always 1 because parfor is intended only for independent tasks.
It is hard to comment on why your specific large data loop was faster with spmd than parfor without seeing a snippet of code. If you could post details about the operations in question then maybe we can identify where the bottleneck is.
0 件のコメント
参考
カテゴリ
Help Center および 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!