2
$\begingroup$

I am using the CUSP CG solver and I ran it on couple of sparse matrices from the University of Florida sparse matrix collection. The solver was able to solve non positive definite sparse matrices. My understanding is that CG solvers can't solve non positive definite sparse matrices? So is how was CUSP's CG solver able to do it?

$\endgroup$
4
$\begingroup$

I highly recommend the following read:

In short, if the matrix is non-positive definite, there is no guarantee that CG will fail. It might be able to solve it (for some RHSs and certain tolerances), but it is just not supposed to and, probably, converges slower than the appropriate methods.

You definitely should look into the other iterative solvers (say, BiCGStab or something else, depending on your problem properties).

NB: I am not familiar with CUPS, so I would also check if there is a function inside that checks the property of the matrix and switches to some other algorithm (unlikely, but possible) – especially if the solver log is ambiguous.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.