MATLAB Answers

Sparse matrix inversion in parallel

16 views (last 30 days)
Alex on 7 Jun 2012
Commented: Remington Reid on 12 Oct 2016
Is there a way to invert a sparse matrix using MATLAB's Parallel Computing Toolbox? For instance, if I type:
>> matlabpool open
>> matlabpool size
ans =
>> A = distributed.sprand(1000,1000,0.01) ;
>> b = distributed.rand(1000,1) ;
>> spmd; x = A\b; end
I get the error message:
Error stack:
mldivide.m at 51
Sparse input arguments are not yet supported.
Is this a fundamental limitation in MATLAB, or am I missing something? I would like to harness parallel computing to invert a large, sparse matrix.
Thanks for your time, Alex

Answers (1)

Jill Reese
Jill Reese on 8 Jun 2012
Hi Alex. Unfortunately, distributed/mldivide is currently limited to solving full linear systems. Thanks for pointing out that this limitation has not been explicitly stated in the help or documentation.
We are continually adding new features to distributed arrays, and we would like to expand our support for sparse linear algebra. Is the example shown in your question representative of the size and sparsity of the linear systems you want to solve? Are there are other linear algebra functions that you would want to use with sparse distributed arrays? We would appreciate any additional information that you might provide.
Remington Reid
Remington Reid on 12 Oct 2016
I have run into the same issue. I'm simulating diffraction using the Finite Difference Frequency Domain method, and solving very large sparse systems. Parallel support for mldivide would be ideal. In my case the sparse matrix has N~10^6, with a density of 10^-6, is complex and not positive semi-definite.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!