Parallel computing toolbox setup

1 vue (au cours des 30 derniers jours)
Rafi Mohammad
Rafi Mohammad le 12 Nov 2020
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).

Réponses (1)

Sourabh Kondapaka
Sourabh Kondapaka le 17 Nov 2020
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

Catégories

En savoir plus sur MATLAB Parallel Server dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by