Registered Member
|
Hello,
I wanted to solve a sparse system according to the tutorial here: http://eigen.tuxfamily.org/dox/TutorialSparse.html If I include
I get the error that "#include <umfpack.h>" is not found (UmfPackSupport tries to include that header), so nevertheless since I guess in my case a cholesky decomposition would be better I tried:
Unfortunately this time "cholmod.h" was not found. So can anybody tell me what I made wrong? Do I need other libraries than eigen3 or is there another way of solving a (symmetric) sparse system? Thanks, matse
Last edited by matse on Sun Jul 31, 2011 12:53 pm, edited 1 time in total.
|
Moderator
|
for UmfpackSupport you need Umfpack, and same for CholmodSupport which requires Cholmod. In Eigen/SparseExtra there is SimplicialCholesky class for builtin LLT and LDLT solving.
|
Registered Member
|
Thanks for the reply! Do you mean this cholmod?
And what do you recommend me, using cholmod or SimplicialCholesky regarding speed? Thanks, matse |
Registered Member
|
Yes, that is the cholmod library mentioned. It is not completely straightforward to compile and install. I wish I could have convinced Tim Davis to use a proper source code control system and include configure scripts. He has a tendency to formulate his own versions of things like templating systems and things start to fall apart if you don't have all the tools he assumes in exactly the right places. If you are working on a Debian-based Linux system (which includes Ubuntu) you can obtain a binary package of cholmod and umfpack and a couple of others libraries like amd and colamd as the libsuitesparse-dev package.
Depends on the complexity of the system. I work with sparse least squares problems that can have millions of observations on hundreds of thousands of coefficients and Cholmod will do better on those problems. However, SimplicialCholesky is object-oriented and makes life much easier than pushing around pointers (including a pointer to a complicated configuration structure) as you end up doing in Cholmod. I mentioned in another posting on this forum that I think there is a serious memory bug in the solve methods for the CholmodDecomposition class (described in messages sent to the eigen mailing list) so I would avoid CholmodSupport until that is resolved. |
Registered Member
|
Hi,
so I've done a little bit of work and at first tried cholmod (had some trouble with the linker but finally got it working), the "LDLT" decomposition at least worked, with the "LLT" decomposition I encounter this bug: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=292 So nevertheless I tried SimplicialCholesky, because as you say it seems to be easier to use, so what I did here was:
But unfortunately this results in the following error:
I guess I made a "major mistake", do I use wrong classes or why does this not work? I have to say that the cholesky decomposition alone:
works, so can anybody give me advice? Thanks matse |
Registered Member
|
|
Registered Member
|
Thank you so much, dmbates! Works really fine, you just saved my day
Unfortunately this was just a "test vector", so the real "vector" will be much bigger, but nevertheless it works now and I will see how it performs later. Thanks for the great support here, matse |
Registered users: bartoloni, Bing [Bot], Google [Bot], Yahoo [Bot]