Matthew Knepley knepley at gmail.com
Thu Jun 23 05:53:41 CDT 2011

On Thu, Jun 23, 2011 at 5:49 AM, Juha Jäykkä <juhaj at iki.fi> wrote:

> >   As Matt notes you absolutely need to run with -pc_type lu
> > -ksp_monitor_true_residual -ksp_converged_reason to make sure that the
> Why lu? I was running with bjacobi for whatever reason, which I no longer
> recall. Probably gave the fastest convergence before introducing the
> horribly
> nonlinear terms.
> I just tried lu again: it converges, too, but snes still diverges. Running
> with -pc_type none requires too many KSP iterations, I had a limit of 1e6
> and
> ran out. I will revisit this while I wait for any further replies, but as
> it
> takes so long, I will finish this reply first.

As Jed points out, there are no a priori guarantees that your system has a
Do you have  a proof? If not, and if the linear systems converge, the most
conclusion is that

  a) Your system has no solution at this parameter value


  b) Your initial guess is far from the solution

In either case, more theoretical investigation of the solution space is



> > linear system solve is not the issue. It is also possible that a bug in
> > the function evaluation (using uninitialized values or something) is
> > causing the difficulty: run with valgrind
> Valgrind complains a LOT about openmpi, which guess is not the issue here.
> It
> also complains about PetscStrcasecmp (sic!) and some other Petsc*
> functions,
> but my code is clean: the last complaint from valgrind (apart from the
> summary
> at the end) comes from SNESSetFromOptions, which is called before I
> construct
> the initial guess.
> Cheers,
> -Juha
> --
>                 -----------------------------------------------
>                | Juha Jäykkä, juhaj at iki.fi                     |
>                | http://www.maths.leeds.ac.uk/~juhaj           |
>                 -----------------------------------------------

What most experimenters take for granted before they begin their experiments
is infinitely more interesting than any results to which their experiments
-- Norbert Wiener
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20110623/07ff6c1e/attachment-0001.htm>

More information about the petsc-users mailing list