Effacer les filtres
Effacer les filtres

What is the best way to solve A\b using distributed computing and sparse matrix?

1 vue (au cours des 30 derniers jours)
Paulo Ribeiro
Paulo Ribeiro le 22 Nov 2017
Commenté : Paulo Ribeiro le 22 Nov 2017
I´m trying to solve a large linear system [A]{x}={B} using the traditional backslash operator and distributed computing. However results are exactly on the other hand of what I expected. An increment in the number of workers is making solution slower. Matrix A is sparse with 1e4 order. What am I doing wrong?
n=1e4
A=sprand(n,n,5e-2)
B=rand(n,1);
[l,m,v]=find(A);
v=distributed(v);
spmd
C = sparse(l,m,v); % distributed sparse array
end
tic
sol_01=A\B; % solution using local array
toc
tic
spmd
sol_02=C\B; % solution using distributed array
end
toc
sol_01 is many times faster than sol_02. Some examples:
- elapsed time for sol_01 = 21.38s
- elapsed time for sol_02 using 4 local workers = 40.66s
- elapsed time for sol_02 using 4 local + 4 remote workers = 43.38s
The current setup employs a 1 gigabit router (Asus N66U) and has been tested to speeds up to 100 megabyte/s. Windows task manager shows activity below 80% on the network. Both machines share the same specs: i7 4790 - 4 cores, gigabit adapters.
  1 commentaire
Paulo Ribeiro
Paulo Ribeiro le 22 Nov 2017
I wonder if this is a result of using 2 quad core nodes as a total of 8 workers. For these intensive linear algebra computations would it be better 2 workers only, with 4 cores each?

Connectez-vous pour commenter.

Réponses (0)

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