MATLAB Answers

MRC
0

Maximum number of workers in a parallel loop (local cluster) with Matlab R2014a?

Asked by MRC
on 26 Aug 2014
Latest activity Commented on by Greg
on 17 Oct 2014
I have a Macbook Pro Intel Core I7; which is the maximum number of workers in a parallel loop (local cluster) with Matlab R2014a? These are the characteristics of my laptop
hw.physicalcpu: 4
hw.logicalcpu: 8

  0 Comments

Sign in to comment.

1 Answer

Answer by Friedrich
on 26 Aug 2014
 Accepted Answer

Hi,
the rule of thumb is to use one worker per pyhsical core. This is also stated here.

  3 Comments

Hence I can only use 4 workers?
You can use more, but if you do its likely that it does not speed things up anymore because your system does not have any futher computational ressources.
Simply try it out. Run with 4 workers and do the same with 8 and see what happens.
Just wanted to add my modest experimental result
sz = 450;
A = rand(sz,sz,'single');
B = rand(sz,sz,'single');
tic;
parfor k = 1:sz^2
fft2(A.*B);
end
toc;
6 workers - 159 sec.
12 workers - 118 sec.

Sign in to comment.