[petsc-users] How to determine a reasonable relative tolerance to iteratively solve a linear system of equations?

Barry Smith bsmith at mcs.anl.gov
Tue Mar 14 17:42:27 CDT 2017


> On Mar 14, 2017, at 5:32 PM, Fangbo Wang <fangbowa at buffalo.edu> wrote:
> 
> Hi, 
> 
> I know this is not a problem specific to PETSc, but I have this doubt for a long time and want to ask the experts here.
> 
> Suppose I have a very large linear system of equations with 1.5 million unkowns. It is common to use relative tolerance as a stopping criteria.
> 
> For a small linear system, I usually use 1e-6, or 1e-8, or 1e-10, etc. But for a very large linear system, do I need to use a relative tolerance much smaller than the previous I use? (Theoretically I think the relative tolerance has nothing related to system size).
> 
> However, something very weird happens. I used 1e-7 as my relative tolerance for my linear system  with 1.5 million unknows using conjugate gradient method with jacobi preconditioner, the solver can not converge to 1e-7 with 10,000 iterations. I can use a larger tolerance but the solution is not good.

   This is not particularly weird. Jacobi preconditioning can perform very poorly depending on the structure of your matrix. 

   So first you need a better preconditioner. Where does the matrix come from? This helps determine what preconditioner to use. For example, is it a pressure solve, a structural mechanics problem, a Stokes-like problem, a fully implicit cdf problem.

   Barry

> 
> Any one have some  advices? Thank you very much!
> 
> Best regards,
> 
> Fangbo Wang
> 
> -- 
> Fangbo Wang, PhD student
> Stochastic Geomechanics Research Group
> Department of Civil, Structural and Environmental Engineering
> University at Buffalo
> Email: fangbowa at buffalo.edu



More information about the petsc-users mailing list