KSP Tolerances

Matthew Knepley knepley at gmail.com
Mon Dec 14 09:18:43 CST 2009


You can see in the info output what is happening. The test is

  rnorm >= ksp->divtol*ksp->rnorm0

Here ||r_0|| = ||b|| = 0.00331536 and ||r|| = 513.979, and thus it results
in divergence. It appears that ILU(0) is very bad for this problem.

   Matt

On Mon, Dec 14, 2009 at 9:07 AM, <jarunan at ascomp.ch> wrote:

> Hi,
>
> Thank you for your advice. With this mail I attach the output file run.log.
> My grid is 2-level grid. The coarse grid is computed first then the fine
> grid. The problem occur in the fine grid. You can see at lines 3098, 4552
> and 6127 where it is diverged.
>
> Regards,
> Jarunan
>
>
>
>
>
> Quoting Matthew Knepley <knepley at gmail.com>:
>
>  Run with -ksp_view -ksp_monitor -info and send us all the output.
>>
>>  Matt
>>
>> On Mon, Dec 14, 2009 at 8:36 AM, <jarunan at ascomp.ch> wrote:
>>
>>
>>> Dear Petsc Team,
>>>
>>> There is something not clear for me about divergence tolerance. Firstly,
>>> my
>>> computation diverges with the reason of dtol (-4), which was set by
>>> default
>>> (10000). When I increased dtol to 1.0e+8, it became converged. However,
>>> the
>>> relative residual where it was diverged is less than the default dtol. I
>>> would like to know, how it is exactly calculated.
>>>
>>> ----------I describe my problem more in detail here.-------------------
>>> As I set the tolerances for the solver as below, my problem diverges with
>>> converged reason -4 (from divergence tolerance)
>>>
>>> call KSPSetTolerances(ksp,1.0e-06,1.0e-20,
>>> PETSC_DEFAULT_DOUBLE_PRECISION,10000,ierr)
>>>
>>> I monitor the residual. it printed the information below and quit the
>>> computation.(I delete the true residual norm and Ax/Ae. Please tell me if
>>> you need them.)
>>>
>>>  0 KSP preconditioned resid norm 5.139790011051e+02
>>>
>>> With -ksp_view, it shows that default value of dtol is 10000. I increased
>>> dtol to 1.0e+8, then the solver solved the problem. With
>>> -ksp_monitor_true_residual, the first 5 iterations read:
>>>
>>>  0 KSP preconditioned resid norm 5.139790011051e+02
>>>  1 KSP preconditioned resid norm 1.840751662590e+01
>>>  2 KSP preconditioned resid norm 3.653339750400e+00
>>>  3 KSP preconditioned resid norm 2.538794826933e+00
>>>  4 KSP preconditioned resid norm 2.299844715275e-01
>>>
>>> Here, from iteration 0 to iteration 1,the relative residual is 0.03580,
>>> much less than 1.0e+4 the default dtol value. So, why was it diverged at
>>> the
>>> first time?
>>>
>>>
>>> ----------------------------------------------------------------------------
>>>
>>> Regards,
>>> Jarunan
>>>
>>>
>>>
>>>
>>> --
>>> Jarunan Panyasantisuk
>>> Development Engineer
>>> ASCOMP GmbH, Technoparkstr. 1
>>> CH-8005 Zurich, Switzerland
>>> Phone : +41 44 445 4072
>>> Fax   : +41 44 445 4075
>>> E-mail: jarunan at ascomp.ch
>>> www.ascomp.ch
>>>
>>>
>>
>>
>> --
>> What most experimenters take for granted before they begin their
>> experiments
>> is infinitely more interesting than any results to which their experiments
>> lead.
>> -- Norbert Wiener
>>
>>
>
>
> --
> Jarunan Panyasantisuk
> Development Engineer
> ASCOMP GmbH, Technoparkstr. 1
> CH-8005 Zurich, Switzerland
> Phone : +41 44 445 4072
> Fax   : +41 44 445 4075
> E-mail: jarunan at ascomp.ch
> www.ascomp.ch
>



-- 
What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
lead.
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20091214/e0b5b7d8/attachment.htm>


More information about the petsc-users mailing list