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

umfpack not work for large size problem in Eigen?

Tags: None
(comma "," separated)
Zhexuan
Registered Member
Posts
4
Karma
0
Hello Eigen Experts,

I ran into an issue when I use umfpack with openblas for large size problem on visual studio c++.

My sparse linear system can be solved correctly below certain size. However, if the size gets over certain size, umfpack gives an error code "1" at step "factorize" which means matrix is singular. But I am sure it is not singular because I can solve the linear system in Matlab using backslash (umfpack with intel MKL) with no issue. I am also sure there is no bug in my code since I print the matrix and vector to files and load them into Matlab and solved the problem with no issue. When I monitor the memory usage in task manager, it looks like the problem happens when the memory reaches 2GB.

My openblas is 64 bit with 32 bit integer. umfpack was compiled with option DLP64. VSC++ is set to as x64. My colleague who doesn't use Eigen have no issue for large size matrix using umfpack and openblas. Do I need to do anything specific to make Eigen 64 bit? Does anyone encounter same issue before?

Thanks,
Zhexuan
Zhexuan
Registered Member
Posts
4
Karma
0
Just tried sequential superLU. This gives no issue at large size. But it is very slow, taking about 10 times more computational time than umfpack for small size problem. It is weird umfpack does not work.
Zhexuan
Registered Member
Posts
4
Karma
0
I think I found out the issue.

In "umfpacksupport.h", eigen calls "umfpack_di_free_numeric" etc rather than "umfpack_dl_free_numeric". Option "di" can only solve problem up to 2GB while option "dl" can solve much larger size problem. I tried to change all "di" to "dl" in the .h file but the code will not compile correctly.

Is there a simple way that I can force the umfpack use dl or zl mode?
Zhexuan
Registered Member
Posts
4
Karma
0
Problem solved.

1. Make sure large size sparse matrix is defined as SparseMatrix<double,0,SuiteSparse_long>
2. Either edit umfpacksupport.h by your own or just use umfpack directly through member functions, e.g. outerIndexPtr(), innerIndexPtr(), valuePtr() to directly access the sparse matrix in column compressed format.
3. Use blas with 64 bit integer eligibility.


Bookmarks



Who is online

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