Parallel computing toolbox setup

1 回表示 (過去 30 日間)
Rafi Mohammad
Rafi Mohammad 2020 年 11 月 12 日
回答済み: Sourabh Kondapaka 2020 年 11 月 17 日
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 Center および File ExchangeMATLAB Parallel Server についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by