spmd-parfor
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Jill Reese
el 31 de Mayo de 2012
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 comentarios
Ver también
Categorías
Más información sobre Parallel for-Loops (parfor) en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!