[petsc-users] Database key for KSP_Solve

Xuefeng Li li at loyno.edu
Thu Jun 14 15:59:54 CDT 2012


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_)
         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)



More information about the petsc-users mailing list