KSP different results with the default and direct LU

Umut Tabak u.tabak at tudelft.nl
Thu Oct 22 08:52:08 CDT 2009


Barry Smith wrote:
>
>    When testing always run with -ksp_converged_reason or call 
> KSPGetConvergedReason() after KSP solve to determine if PETSc thinks 
> it has actually solved the system. Also since iterative solvers only 
> solve to some tolerance the answer may not be "wrong" it may just be 
> accurate up to the tolerance and with ill-conditioned matrices a tight 
> tolerance on the residual norm may still be a loose tolerance on the 
> norm of the error.
Dear Barry,

Thanks for the advice and tolerance reminder, indeed I missed that.
>     General purpose iterative solvers, like in PETSc, used willy-nilly 
> for very ill-conditioned linear systems, are basically worthless. You 
> need to either stick to direct solvers or understand the types of 
> iterative solvers that are used in the field of expertise for your 
> class of problems.  For example, if your problems come from 
> semi-conductor simulations then you need to understand the literature 
> of iterative solvers for semi-conductors before proceeding. For 
> reasonably well-conditioned solvers where a variety of iterative 
> methods "just work", that is converge ok, you can try them all to see 
> what is fastest on your machine, but for nasty matrices this "trial 
> and error" is a waste of time, because almost none of the iterative 
> solvers will even converge, those that converge will not always 
> converge (they are not reliable) and they will be slower than direct 
> solvers. We've had good success with the MUMPS parallel direct solver 
> and recommend trying the other ones as well. If your goal is to run 
> some simulation (and not do "research" on iterative solvers for nasty 
> matrices) I would just determine the best direct solver and use it 
> (and live with the memory usage and time it requires).
Thanks for this explanation, it is really helpful. My matrices seem 
quite nasty(and unsymmetric from the point of view of 
eigenvalues/vectors), so my goal is not conducting research in this 
field but rather to solve my linear systems and nasty eigenvalue 
problems as an engineer to get the results reliably.

So as a conclusion I should go 'direct' as long as I am not pretty sure 
about reliability of my iterative methods.

Thanks again.

Umut



More information about the petsc-users mailing list