KSPSkipConverged
Matthew Knepley
knepley at gmail.com
Tue Aug 28 13:44:51 CDT 2007
Todd's response was that there are reasons it can stop early, like happy
breakdown, so we really need to test this with the dev version to track
down this behavior.
Matt
On 8/28/07, Matthew Knepley <knepley at gmail.com> wrote:
> On 8/28/07, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> > On 8/28/07, Matthew Knepley <knepley at gmail.com> wrote:
> > > Yes, definitely. Go ahead and push it.
> >
> > I started to try this by implementing first on petsc4py with
> > petsc-2.3.3-p4, by solving a trivial SPD diagonal system { A_ii =
> > 1/(i+1) } with no PC and maxit=5. Below the results, some things seems
> > broken.
> >
> > I think I will do the following:
> >
> > 1- Correct things in release-2.3.3, KSP's should not set
> > KSP_DIVERGED_ITS if the convergence test returned other than
> > KSP_CONVERGED_ITERATING (all GMRES's, RICHARDSON and TCQMR seems to do
> > this). It also seems that I have to review KSP type GLTR (it stopped
> > at iteration 4 and not 5, as it should).
> >
> > 2- Modify KSPSkipConverged and push on petsc-dev. Or perhpas can we
> > also push this on release-2.3.3? The previous way is rather buggy,
> > especially in conjunction with KSP_NORM_NO.
>
> Sounds good. I will ask Todd about gltr since it might be supposed to
> do something
> funny. You really do not want to look at it.
>
> Matt
>
> > Below the result (petsc4py is a nice tool for test/debug, isn't it?)
> >
> >
> > tfqmr - CONVERGED_ITS - iters: 5, ||r|| = 4.881889e-03,
> > x0,N-1=0.999996,9.978373
> > minres - CONVERGED_ITS - iters: 5, ||r|| = 5.356222e-02,
> > x0,N-1=1.000009,9.701171
> > fgmres - DIVERGED_ITS - iters: 5, ||r|| = 5.356222e-02,
> > x0,N-1=1.000009,9.701171
> > stcg - CONVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > qcg - CONVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=-1.000052,-9.771470
> > cg - CONVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > lgmres - DIVERGED_ITS - iters: 5, ||r|| = 5.356222e-02,
> > x0,N-1=1.000009,9.701171
> > cgne - CONVERGED_ITS - iters: 5, ||r|| = 7.192229e-02,
> > x0,N-1=1.000000,7.116166
> > chebychev - DIVERGED_ITS - iters: 5, ||r|| = 2.591834e+00,
> > x0,N-1=0.636559,0.708271
> > cgs - CONVERGED_ITS - iters: 5, ||r|| = 1.457830e-03,
> > x0,N-1=1.000000,9.994777
> > bicg - CONVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > lsqr - CONVERGED_ITS - iters: 5, ||r|| = 4.612376e-01,
> > x0,N-1=1.000000,7.116166
> > gltr - CONVERGED_ITS - iters: 4, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > tcqmr - DIVERGED_ITS - iters: 5, ||r|| = 0.000000e+00,
> > x0,N-1=1.000009,9.701171
> > bcgs - CONVERGED_ITS - iters: 5, ||r|| = 2.566301e-03,
> > x0,N-1=0.999703,9.982615
> > cr - CONVERGED_ITS - iters: 5, ||r|| = 5.356222e-02,
> > x0,N-1=1.000009,9.701171
> > symmlq - CONVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > bcgsl - CONVERGED_ITS - iters: 5, ||r|| = 1.232695e-03,
> > x0,N-1=0.999988,9.999315
> > lcd - DIVERGED_ITS - iters: 5, ||r|| = 5.629995e-02,
> > x0,N-1=1.000052,9.771470
> > preonly - CONVERGED_ITS - iters: 1, ||r|| = 0.000000e+00,
> > x0,N-1=1.000000,1.000000
> > gmres - DIVERGED_ITS - iters: 5, ||r|| = 5.356222e-02,
> > x0,N-1=1.000009,9.701171
> > richardson - DIVERGED_ITS - iters: 5, ||r|| = 1.215430e+00,
> > x0,N-1=1.000000,4.095100
> >
> >
> >
> >
> > >
> > > On 8/28/07, Lisandro Dalcin <dalcinl at gmail.com> wrote:
> > > > Does it make sense to change KSPSkipConverged to return
> > > > KSP_CONVERGED_ITS if iternum==maxit ?
> > > >
> > > > KSP_DIVERGED_ITS means convergence failure, but IMHO, KSPSkipConverged
> > > > should not imply convergence failure (this has implications in SNES).
> > > >
> > > >
> > > > --
> > > > 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
> > > >
> > > >
> > >
> > >
> > > --
> > > 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
> > >
> > >
> >
> >
> > --
> > 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
> >
> >
>
>
> --
> 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
>
--
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-dev
mailing list