Could `distributed array` accelerate the speed of solving Linear Equations with Iterative Methods?
Show older comments
I am using Iterative Methods, like preconditioned conjugate gradients to solve large sparse linear equations(800,000*800,000). I am glad to find that the distributed array could use parallel methods to achieve this. I think this may be faster. However, in my test data. The distributed array is always slower than the normal sparse matrix. (200 VS 50 seconds). Is this normal? what is the advantages of distributed array to solve the sparse linear equations? My part code is like below. Did I miss some steps for distributed array?
% A is a sparse large matrix ,800,000*800,000 size
% b is the right vector of the equations, 800,000*1 size
Adist = distributed(A);
bdist = distributed(b);
M = ichol(A, struct('type','ict','droptol',1e-3));
[xPCG1,flagPCG1,relresPCG1,iterPCG1,resvecPCG1]=pcg(Adist,bdist,tol,maxit,M,M'); % about 200s
[xPCG2,flagPCG2,relresPCG2,iterPCG22,resvecPCG2]=pcg(A,b,tol,maxit,M,M');% about 50s
Accepted Answer
More Answers (0)
Categories
Find more on Sparse Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!