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

Eigen Sparse Solver

Tags: None
(comma "," separated)
Abhijit
Registered Member
Posts
5
Karma
0
OS

Eigen Sparse Solver

Wed Dec 22, 2010 2:20 pm
Hi All,

First time I am using this , I am having some problem can anyone help me for this

VectorXd b(N);
DynamicSparseMatrix<double,RowMajor> A(N,N); (N = 20K * 20 K)



#ifdef EIGEN_SUPERLU_SUPPORT
{
Eigen::SparseMatrix<double,RowMajor> B = A;
Eigen::SparseLU<Eigen::SparseMatrix<double,RowMajor>,Eigen::SuperLU> slu(B);
if(slu.succeeded())
std::cout << "SUCCEDED!" << std::endl;
else
std::cout << "FAILED!" << std::endl;

bool ok = slu.solve(b,&ones);

if(ok)
std::cout << "SUCCEDED!" << std::endl;
else
std::cout << "FAILED!" << std::endl;

}
#endif

command use to execute code :

g++ -I/home/prion/Eigen/eigen ex1.cpp -L/home/prion/Eigen/eigen/SuperLU/SuperLU_4.1/lib -lsuperlu_4.1 -L/home/prion/petsc-3.1-p5/cygwin-c-debug/lib -lf2cblas

My code is compiling properly . But when I try to execute code getting following error

$ ./a.exe
SuperLU Support
Can't expand MemType 0: jcol 14132
Segmentation fault (core dumped)

. Also when I try to create the solver using following statement
Eigen::SparseLU<Eigen::SparseMatrix<double,RowMajor>,Eigen::SuperLU> slu(B);

Its taking to much time and end with the result for smaller Sparse Matrix "FAILED" and for the large Sparse matrix "Can't expand MemType 0: jcol 14132
Segmentation fault (core dumped)".

I don't know how can I proceed on this.

This is very urgent for me . Can anyone let me know what is the problem here?

Also is there other alternate efficient solver avaliable in the Eigen . If yes , can anyone let me know steps to work with those solver.

Softwars:
SuperLU 4.1
BLAS : 3.1.1


Regards
Abhijit
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: Eigen Sparse Solver  Topic is solved

Fri Dec 31, 2010 4:50 pm
Hi,

for the perf issue, you should specify an ordering method, e.g.:

slu.setOrdering(Eigen::ColApproxMinimumDegree);

The current default is "no ordering", that is stupid, I know.

Could you also try with a ColMajor SparseMatrix for B ?
Abhijit
Registered Member
Posts
5
Karma
0
OS

Re: Eigen Sparse Solver

Thu Jan 06, 2011 10:40 am
hi ,

Thanks I got solution.

Regards
Abhijit


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft