In parallel processing, are multiple workers used for anything else than parfor loops?

1 view (last 30 days)
When using the parallel computing toolbox, are parfor loops required for parallel processing? I plan to use parfor loops, but the most expensive part of my program is SVD, which is performed during each iteration of a loop. Will MATLAB break up the SVD into multiple workers?

Accepted Answer

Shashank Prasanna
Shashank Prasanna on 2 Aug 2013
Edited: Shashank Prasanna on 2 Aug 2013
Using SVD under a parfor will likely slow the performance of SVD. SVD is inherently multithreaded and make use of multiply cores calling it as it is. Here are a list of function that are inherently multithreaded:
To comment further on how we could speed up your code, we may need to see more of what you have within the parfor loop.
  5 Comments
Shashank Prasanna
Shashank Prasanna on 4 Aug 2013
Edited: Shashank Prasanna on 4 Aug 2013
SVD is already multithreaded. It does make use of multiple cores.
Here is the difference between multicore (like svd) and multiprocessor (using PCT):
Clare
Clare on 4 Aug 2013
Edited: Clare on 6 Aug 2013
EDIT: Never mind, I figured it out!
Ok, thanks for the response and link. I asked because I have experimented on my laptop, which has 4 cores and 8 threads. Yet a labor-intensive SVD computation hovers around 200% of CPU usage, suggesting it is using 2 threads in one core only. Any idea why this may be happening, and how to change it? Thanks again for your help.
p.s. On my laptop I have version r2011a. I tried changing the maximum # of threads to 8 using the "LASTN = maxNumCompThreads(8)" command. No luck.

Sign in to comment.

More Answers (0)

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!