[petsc-dev] Mark, what's the rational for keeping the Chebyshev tuning inside GAMG?

Mark Adams mfadams at lbl.gov
Wed Feb 25 10:13:58 CST 2015


This code structure goes back 20 years, but these are the reasons (not
necessarily adequate reasons) for it.

1) You need the Jacobi eigen estimates it what is the setup phase of the
solver.  Its like needing to do ILU to do the symbolic factorization of a
matrix -- you don't have a solver necessarily when you do the setup.

2) crazy matrices

3) setting an intelligent minimum eigenvalue for Cheby that is MG specific.

4) CG should be the default for this because SA should be use for symmetric
matrices and CG is much better than GMRES in my experience.

I think I lost the (4) fight long ago.  (3) is done with user input and
maybe we make something like this the default in Cheby because smoothers
are where Cheby is used most.  (2) can be ignored or fixed some other way.
 (1) could be fixed. It looks like a lot of code reshuffling but a) maybe
that is a good thing anyway, and 2) maybe it is not as complicated as it is
looking to me right now.  There are a lot of dependencies here.  That is
why it is so complicated but I can probably simplify this.




On Wed, Feb 25, 2015 at 11:02 AM, Mark Adams <mfadams at lbl.gov> wrote:

>
>
> On Mon, Feb 23, 2015 at 7:19 AM, Tobin Isaac <tisaac at ices.utexas.edu>
> wrote:
>
>> On Sun, Feb 22, 2015 at 07:48:51PM -0700, Jed Brown wrote:
>> > Barry Smith <bsmith at mcs.anl.gov> writes:
>> > >   Jed,
>> > >
>> > >    Wrong, wrong, wrong. You are looking at the wrong place in the
>> > >    code. (Yes, this is a problem with duplicate code in THREE!
>> > >    places). I am referring to the code around line 795 in gamg.c /* do
>> > >    my own cheby */ which I actually cut and pasted into my previous
>> > >    email. You are referring to the code in agg.c around line 1209
>> > >    which does what you said.
>> >
>> > Okay, yes.
>> >
>> > >    The code I am referring to computes the estimates used by the
>> > >    smoother on each level and thus forces a bypass of the code in
>> > >    Chebyshev.c it seems completely unneeded to me (aside from maybe
>> > >    the hack for crazy matrices) since Chebyshev.c will do it next
>> > >    automatically anyways.
>> >
>> > Yeah. It would be nice to avoid repeating the estimate when the smoother
>> > matches the AMG smoothing.
>>
>> If we just keep the part that calls KSPChebyshevSetEigenvalues()
>> (gamg.c:801) when the smoother PC is Jacobi or SOR, that would
>> accomplish this.  The used would have to recognize what's happening
>> and not call -mg_levels_ksp_chebysev_estimate_eigenvalues, which would
>> recompute/override the values that gamg sets.
>>
>
> That is a reasonable approach.
>
>
>>
>> As for crazy matrices, I think the most general solution is for
>> KSPChebyshev to try a MatProjectDirichlet(Mat,Vec) method on the rhs
>> it uses for estimation.
>>
>>
> That sounds promising.  Is that basically the same code that I have?
>
>
>
>>   Toby
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150225/3d529d8f/attachment.html>


More information about the petsc-dev mailing list