- 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:
What is the cause of the error of "CPARDISO encountered an error in phase 22: Error code = -2."?
5 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Oli Tissot
2020-8-13
Your guess is correct, you are getting this error because there is not enough local memory available. Some workarounds would be:
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...
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Distributed Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!