This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Eigen Sparse Solver using SuperLU

Tags: None
(comma "," separated)
Hirotaro
Registered Member
Posts
2
Karma
0

Eigen Sparse Solver using SuperLU

Thu May 10, 2012 9:22 am
Hej experts!
I have encountered the following problem while trying to solve a system of linear equations:
"Can't expand MemType 1: jcol 206115"

When number of nonzero coefficients in matrix is <500.000 this problem does not exist. Howevewer, once I try to solve larger set ot equations, MemType 1 problem occures. Any ideas?

I am using:
Windows 7 32bit
Visual Studio 2010
Eigen 3.1.0-alpha2
SuperLU 4.3 + OpenBLAS (Based on GoTo BLAS)
´

Code: Select all
#include <iostream>
#include <algorithm>
#include <Eigen/Sparse>
#include <Eigen/SuperLUSupport>

using namespace Eigen;
using namespace std;

int main(){
SparseMatrix<double>  Q(mat_size,mat_size);   //Declare infinitesimal matrix Q
Q.reserve(VectorXi::Constant(mat_size,6));   //Reserve space per column
 // populate matrix Q
VectorXd b(mat_size), x(mat_size);
SuperLU<SparseMatrix<double> > solver;
   solver.compute(Q);
 x = solver.solve(b);
}

User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
I guess SuperLU ran out of memory. If that's really the case that means your problem is not sparse/structured enough for a direct solver. You could then try our iterative BiCGSTAB solver.
Hirotaro
Registered Member
Posts
2
Karma
0

Re: Eigen Sparse Solver using SuperLU

Wed May 16, 2012 10:19 am
Thank you ggael for your answer. I am afraid that you are right about not enough physical memory space - this is what I have thinking about too. I have tried BiCGSTAB solver but it seem to run forever, while SuperLU handles a little smaller problems in approx 10-15s .

However, can you please explain what you mean by: 'If that's really the case that means your problem is not sparse/structured enough for a direct solver'.

Matrix I was trying to solve was 94825^2 with 567198 non-zero coefficients (6.308E-05 %). Therefore, I would say it is a sparse one. Moreover, it is a Markov Chain model so pattern of nonzero elements in the matrix is block repetitive, thus pretty much structured.
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
Indeed, about 6 nonzeros per row is very sparse, and 100k^2 is not that huge. I'm very surprised it runs out of memory like this. Perhaps you could give a try with UmfpackSupport ? Regarding BiCGSTAB, make sure you are using the devel branch. You might also try to use the IncompleteLU preconditioner with appropriate settings (tolerance and fillin, see its documentation).


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell, Yahoo [Bot]