ML's multigrid

Lisandro Dalcin dalcinl at gmail.com
Mon Mar 24 09:05:42 CDT 2008


Thomas, please note that what Barry described, in fact should apply to
ALL solvers and preconditioners. That is, if you sucessively call
KSPSolve several times (without calling KSPSetOperator), then the
setup phases are done only in the first call. If you detect some
situation where this seems to not be true, let us know about it.

On 3/23/08, Thomas Geenen <geenen at gmail.com> wrote:
> thats right.
>  i must have overseen it since i used it before for ILU /cg type combinations
>  and mumps.
>
>  thanks
>
> Thomas
>
>
>  On Sunday 23 March 2008 16:58, Barry Smith wrote:
>  >    Thomas,
>  >
>  >      It is possible there is an error in our PCSetUp_ML() but more
>  > likely
>  > there is a misunderstanding. If you call KSPSolve() repeatedly without
>  > calling KSPSetOperators() again then it uses the same matrix and
>  > preconditioner
>  > as for the previous solve (that is KSP does not know that you changed
>  > entries in the matrix). If you change the matrix you must call
>  > KSPSetOperators()
>  > again to get the new preconditioner being built before calling
>  > KSPSolve()
>  > again.
>  >
>  >     Barry
>  >
>  > On Mar 23, 2008, at 2:46 AM, Thomas Geenen wrote:
>  > > dear Petsc users,
>  > >
>  > > I am using the AMG from ML as a preconditioner to CG. I am looking
>  > > at the
>  > > scaling characteristics of different parts of the preconditioner
>  > > (some rough
>  > > timings). To this end I have put some timing calls in ml.c.
>  > > now when i run the code and the solver is called for the first time
>  > > i can see
>  > > that indeed the ML routines are called in particular PCSetUp_ML.
>  > > In this routine a considerable amount of time is spend in the
>  > > aggregation and
>  > > interpolation operator construction (as expected). However the
>  > > second time
>  > > the solver is called this routine is no longer called. This seems to
>  > > be
>  > > inconsistent with the concept of AMG where the coarse grids and
>  > > interpolation
>  > > operators have to be constructed again when the matrix has changed
>  > > (due to
>  > > changing material properties as a function of time for instance).
>  > > Destroying the preconditioner after each solve seems a waste of
>  > > resources
>  > > especially since in PCSetUp_ML , there are options to reuse
>  > > datastructures.
>  > > pc-setupcalled, reuse etc.
>  > >
>  > > are the aggregation and interpolation comstruction routines called
>  > > from a
>  > > different part in the code?
>  > > ML_Gen_MGHierarchy_UsingAggregation(ml_object,
>  > > 0,ML_INCREASING,agg_object);
>  > > seems to be called only from PCSetUp_ML.
>  > >
>  > > cheers
>  > > Thomas
>
>


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594




More information about the petsc-users mailing list