What is the cause of the error of "CPARDISO encountered an error in phase 22: Error code = -2."?

4 views (last 30 days)
I am trying to solve a large sparse matrix equation Ax = b. A is in 700000*700000, and b is in 700000*500. I am using the distributed array to solve it.
parpool(12);
Ad = distributed(A);
bd = distributed(b);
xd = Ad\bd;
But when it ran at the line of “xd = Ad\bd;". It gives an error
Error using \ (line 53)
Internal error during sparse distributed solve: CPARDISO
encountered an error in phase 22: Error code = -2.
Error in distributed/wrapRemoteCall>iInnerWrapper (line 83)
[varargout{:}] = fcnH( varargin{:} );
Error in spmd_feval_fcn>get_f/body (line 78)
[outCell{:}] = fcnH( inCell{:} );
Why did this happen? I have searched on the net but never find a clue. And When b is "thinner", which is 700000*50. The code rans well. Is it a problem of the space of RAM? I guess so. But in that way how much RAM is sufficient? Any suggestion would be appreciated.

Accepted Answer

Oli Tissot
Oli Tissot on 13 Aug 2020
Your guess is correct, you are getting this error because there is not enough local memory available. Some workarounds would be:
  • Increase the number of workers to use more physical machines -- this is not going to work if you use a "local" parpool
  • Split your b in slices and solve the slices each at a time. In that case, I strongly recommend to use the decomposition object and do something like:
decA = decomposition(Ad);
for i = 1:nSlices
% Get bdSlicei, for instance load it from a file
xdSlicei = decA \ bdSlicei;
% Use xdSlicei, for instance save it to a file
end
The question "how much RAM is sufficient?" is hard to answer a priori. For sparse matrices "\" is basically decomposing your matrix A into a product L*U where L and U are triangular but in general these matrices are denser than A. That's why you may very well be able to store A but not L and U. The amount of sparsity lost depends on the pattern of A and it is discovered during the decomposition. In practice, it is very problem dependent unfortunately...

More Answers (0)

Categories

Find more on Parallel Computing Fundamentals in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!