MG question

Barry Smith bsmith at mcs.anl.gov
Wed Feb 27 15:39:36 CST 2008


On Feb 27, 2008, at 3:21 PM, jens.madsen at risoe.dk wrote:

> Thanks again :-)
>
> The reason why I ask is that my code is actually much faster without
> GMRES.. I thought that MG accelerated Krylov methods were always the
> fastest methods.... I am no expert, so I was just wondering why the
> default in DMMG is GMRES/ILU.

   It is just for robustness, not for speed.

>
>
> In the articles I have been able to find, PCG/MG(GS-RB/zebra)(SPD) and
> GMRES/ MG(GS-RB/zebra) on the problems I) and II) respectively,  
> seems to
> be faster than (one level) preconditioned Krylov methods and MG.
>
> I am new in this field and find it very difficult even to choose which
> methods to test and compare(there are so many possibilities). :-D
>
> I will keep on testing :-)
>
> Thanks you very much for your answers.
>
> Jens
>
>
> -----Original Message-----
> From: owner-petsc-users at mcs.anl.gov
> [mailto:owner-petsc-users at mcs.anl.gov] On Behalf Of Barry Smith
> Sent: Wednesday, February 27, 2008 9:45 PM
> To: petsc-users at mcs.anl.gov
> Subject: Re: MG question
>
>
> On Feb 27, 2008, at 2:22 PM, jens.madsen at risoe.dk wrote:
>
>> Ok
>>
>> Thanks Matthew and Barry
>>
>> First I solve 2d boundary value problems of size 512^2 - 2048^2.
>>
>> Typically either kind of problem(solve for phi)
>>
>> I) poisson type equation:
>>
>> \nabla^2 \phi(x,y) = f(x,y)
>
> There is no reason to use GMRES here, use
>
> -ksp_type richardson -mg_levels_pc_type sor -mg_levels_ksp_type
> richardson
> should require about 5-10 outter iterations to get reasonable
> convergence
> on the norm of the residual.
>
>>
>>
>> II)
>>
>> \nabla \cdot (g(x,y) \nabla\phi(x,y))  = f(x,y)
>>
>     If g(x,y) is smooth and not highly varying again you should not
> need GMRES.
> If it is a crazy function than the whole kitchen sink will likely give
> better convergence.
>
>    I do not understand your questions. If you don't need GMRES/CG
> then don't use
> it and if you think you might need it just try it and see if it helps.
>
>    Barry
>
>> Successively with new f and g functions
>>
>>
>> Do you know where to read about the smoothing properties of GMRES and
>> CG? All refs that I find are only describing smoothing with GS-RB  
>> etc.
>>
>> My vague idea on how a fast solver is to use a (preconditioned ILU?)
>> krylov (CG for spd ie. problem I, GMRES for II)) method with
>> additional
>> MG preconditioning(GS-RB smoother, Krylov solver on coarsest level)?
>>
>> As my problems are not that big I fear that I will get no MG speedup
>> if
>> I use krylov methods as smoothers?
>>
>> Kind Regards Jens
>>
>>
>> -----Original Message-----
>> From: owner-petsc-users at mcs.anl.gov
>> [mailto:owner-petsc-users at mcs.anl.gov] On Behalf Of Barry Smith
>> Sent: Wednesday, February 27, 2008 8:49 PM
>> To: petsc-users at mcs.anl.gov
>> Subject: Re: MG question
>>
>>
>>  The reason we default to these "very strong" (gmres + ILU(0))
>> smoothers is robustness, we'd rather have
>> the solver "just work" for our users and be a little bit slower than
>> have it often fail but be optimal
>> for special cases.
>>
>>   Most of the MG community has a mental block about using Krylov
>> methods, this is
>> why you find few papers that discuss their use with multigrid. Note
>> also that using several iterations
>> of GMRES (with or without ILU(0)) is still order n work so you still
>> get the optimal convergence of
>> mutligrid methods (when they work, of course).
>>
>>   Barry
>>
>>
>> On Feb 27, 2008, at 1:40 PM, Matthew Knepley wrote:
>>
>>> On Wed, Feb 27, 2008 at 1:31 PM,  <jens.madsen at risoe.dk> wrote:
>>>> Hi
>>>>
>>>> I hope that this question is not outside the scope of this
>>>> mailinglist.
>>>>
>>>> As far as I understand PETSc uses preconditioned GMRES(or another
>>>> KSP
>>>> method) as pre- and postsmoother on all multigrid levels? I was  
>>>> just
>>>
>>> This is the default. However, you can use any combination of KSP/PC
>>> on any
>>> given level with options. For instance,
>>>
>>> -mg_level_ksp_type richardson -mg_level_pc_type sor
>>>
>>> gives "regulation" MG. We default to GMRES because it is more  
>>> robust.
>>>
>>>> wondering why and where in the literature I can read about that
>>>> method? I
>>>> thought that a fast method would be to use MG (with Gauss-Seidel  
>>>> RB/
>>>> zebra
>>>> smothers) as a preconditioner for GMRES? I have looked at papers
>>>> written by
>>>> Oosterlee etc.
>>>
>>> In order to prove something about GMRES/MG, you would need to prove
>>> something
>>> about the convergence of GMRES on the operators at each level. Good
>>> luck. GMRES
>>> is the enemy of all convergence proofs. See paper by Greenbaum,
>>> Strakos, & Ptak.
>>> If SOR works, great and it is much faster. However, GMRES/ILU(0)
>>> tends
>>> to be more
>>> robust.
>>>
>>> Matt
>>>
>>>> Kind Regards
>>> -- 
>>> 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
>>>
>>
>>
>
>




More information about the petsc-users mailing list