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

crash with IncompleteCholesky

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

crash with IncompleteCholesky

Sat Jul 29, 2017 10:31 pm
I have question about ConjugateGradient with IncompleteCholesky on 3.3.4.
If I use IncompleteCholesky, it get crash.

Eigen::ConjugateGradient< Eigen::SparseMatrix<double>, Eigen::Lower|Eigen::Upper, Eigen::IncompleteCholesky<double> > Solver;
Solver.setMaxIterations(m_nMaxIterations);
Solver.setTolerance(tolerance);
Solver.compute(mat);
Eigen::VectorXd prs = Solver.solve(rhs);

It happens after compute. But the other Preconditioner works well.
So, what is problem???

And I have another question about matrix.
Even if I use uncompressed matrix, speed of solver is same. like this.

Eigen::SparseMatrix<double> mat(x_size, x_size);
mat.uncompress();
mat.setFromTriplets(triplets.begin(), triplets.end());
Eigen::ConjugateGradient< Eigen::SparseMatrix<double>, Eigen::Lower|Eigen::Upper > Solver;
Solver.compute(mat);
Eigen::VectorXd prs = Solver.solve(rhs);

Why those speed is not change???
I imagine that compressed matrix should have more speed.

thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: crash with IncompleteCholesky

Mon Aug 07, 2017 10:15 pm
setFromTriplets turns your matrix in compressed form, the uncompressed layout is only enabled for dynamic insertions. Anyway, both layout are equivalent in speed unless way too much memory has been reserved per column in the uncompressed mode.

Regarding IncompleteCholesky, make sure you compile with assertions on (i.e. without -DNDEBUG) and check for possible assertions and/or check that Solver.info()==Success after each call to the Solver.
Makoto
Registered Member
Posts
5
Karma
0

Re: crash with IncompleteCholesky

Tue Aug 08, 2017 5:43 pm
Thank you for your advice.
Actually, I got work with IncompleteCholesky. But in my case, it was almost 2x slower than the other preconditioner. (but number of iterate was reduced).
Do you know something speed-up thing with it???

thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: crash with IncompleteCholesky

Tue Aug 08, 2017 8:19 pm
Have you tried the direct SimplicialLDLT<> solver? If you're working on a 2D domain it is likely to be faster. You might also try playing with the parameters of the IncompleteCholesky preconditioner; they allow to balance the precomputation cost wrt the number of required iterations.
Makoto
Registered Member
Posts
5
Karma
0

Re: crash with IncompleteCholesky

Tue Aug 08, 2017 8:32 pm
I'm playing on 3D.
And I don't know why but I got crash SimplicialLDLT. Even if I fixed my matrix problem on IncompleteCholesky.

thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS

Re: crash with IncompleteCholesky

Wed Aug 16, 2017 4:45 pm
It's likely a out-of-memory issue. If not, then the only way to help would be to save and share your matrix as explained there: http://eigen.tuxfamily.org/dox/group__T ... tml#title7, so that we can reproduce the crashes.


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], sandyvee, Sogou [Bot]