필터 지우기
필터 지우기

spmd-parfor

조회 수: 1 (최근 30일)
oblivious
oblivious 2012년 5월 31일
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

답변 (1개)

Jill Reese
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.

카테고리

Help CenterFile Exchange에서 Parallel for-Loops (parfor)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by