Parallel computing toolbox setup

1 次查看(过去 30 天)
Is there any additional configuration need to be done inorder to use parallel computing toolbox in default cluster (local)? I have 12 workers in parallel pool (local ) and automatically create a parallel pool box checked.
With this default cluster I tried to use parfor, it doesn't work (showing busy for long time- no sign of finishing the job).

回答(1 个)

Sourabh Kondapaka
Sourabh Kondapaka 2020-11-17
Hi ,
Can you try out a simpler example and check, as shown below:
tic
n = 1000;
A = 500;
a = zeros(1,n);
%Without parfor
for i = 1:n
a(i) = max(abs(eig(rand(A))));
fprintf('%d %d \n', i, a(i));
end
toc
Elapsed time : 98 seconds
tic
n = 1000;
A = 500;
a = zeros(1,n);
%With parfor
parfor i = 1:n
a(i) = max(abs(eig(rand(A))));
fprintf('%d %d \n', i, a(i));
end
toc
Elapsed time : 57 seconds

类别

Help CenterFile Exchange 中查找有关 MATLAB Parallel Server 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by