[petsc-users] Database key for KSP_Solve

Matthew Knepley knepley at gmail.com
Thu Jun 14 16:04:49 CDT 2012


On Fri, Jun 15, 2012 at 4:59 AM, Xuefeng Li <li at loyno.edu> wrote:

> On Fri, 15 Jun 2012, Matthew Knepley wrote:
>
>  On Fri, Jun 15, 2012 at 4:22 AM, Xuefeng Li <li at loyno.edu> wrote:
>>
>>  On Fri, 15 Jun 2012, Matthew Knepley wrote:
>>>
>>>  On Fri, Jun 15, 2012 at 3:08 AM, Xuefeng Li <li at loyno.edu> wrote:
>>>
>>>>
>>>>  Are there any database keys to control the number of
>>>>
>>>>> times KSP_Solve() is called? Where is the loop that
>>>>> calls KSP_Solve?  The key -ksp_max_it does not seem
>>>>> to affect it.
>>>>>
>>>>>
>>>>>  Then this option did not reach the solver. You may have set a prefix.
>>>>
>>>> Run with -snes_max_it 1 -ksp_max_it 1 -snes_view to see what you are
>>>> actually doing.
>>>>
>>>>  The key -ksp_max_it affects the iteration number
>>>>
>>> for the (main) ksp object for SNES, but not the ksp
>>> object for PC.
>>>
>>>
>> 1) Why do you have a KSP object underneath your PC?
>>
>>  I should've made myself clearer in the last email. I get
> ksp through DMMGGetKSP(), and get pc through KSPGetPC().
> I then KSPSetType() to gmres; PCSetType() to pcasm. That's
> all I've done in the program.
>
> After using -snes_view, the output shows the following.
>  KSP Object:
>    type: gmres
>      GMRES: restart=30, using Classical (unmodified) Gram-Schmidt
> Orthogonalization with no iterative refinement
>      GMRES: happy breakdown tolerance 1e-30
>    maximum iterations=2222, initial guess is zero
>    tolerances:  relative=1e-08, absolute=1e-50, divergence=10000
>    left preconditioning
>    using PRECONDITIONED norm type for convergence test
>  PC Object:
>    type: asm
>      Additive Schwarz: total subdomain blocks = 1, amount of overlap = 1
>      Additive Schwarz: restriction/interpolation type - RESTRICT
>      Local solve is same for all blocks, in the following KSP and PC
> objects:
>      KSP Object:(sub_)
>
        ^^^^^^^^^^^^^^^^^^

It is telling you right here what the name is, -sub_ksp_max_it 1

   Matt


>        type: preonly
>        maximum iterations=10000, initial guess is zero
>
> Iteration remains 10,000.
>
>
> Regards,
>
> --Xuefeng Li, (504)865-3340(phone)
>  Like floating clouds, the heart rests easy
>  Like flowing water, the spirit stays free
>       http://www.loyno.edu/~li/home
>  New Orleans, Louisiana (504)865-2051(fax)
>
>


-- 
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/20120615/3161aa43/attachment.html>


More information about the petsc-users mailing list