[CIG-SHORT] Nonlinear solve diverged_function_count

Matthew Knepley knepley at gmail.com
Wed Mar 2 12:28:57 PST 2016


On Wed, Mar 2, 2016 at 2:25 PM, Brad Aagaard <baagaard at usgs.gov> wrote:

>
> -------- Forwarded Message --------
> Subject: Re: [CIG-SHORT] Nonlinear solve diverged_function_count
> Date: Thu, 3 Mar 2016 09:20:55 +1300
> From: Charles Williams <willic3 at gmail.com>
> Reply-To: cig-short at geodynamics.org
> To: cig-short <cig-short at geodynamics.org>
>
> Hi Bobby,
>
> I’m not sure how to increase the value for ksp_sub.  I would have to dig
> around in the code or documentation.  Can you remind me again what sort of
> frictional model you are using, and what sort of friction values? Also,
> what are you using for a normal stress?
>

In order to look at the convergence, I need you to give

-snes_view
-snes_converged_reason -snes_monitor
-ksp_monitor_true_residual -ksp_converged_reason

  Thanks,

     Matt


> As a further test to isolate the problem, maybe you can turn off
> everything except for one throughgoing fault, and see if that converges.
>
> Cheers,
> Charles
>
>
> On 3/03/2016, at 2:11 AM, Bobak Karimi <bkarimi at clarion.edu> wrote:
>>
>> Hi Charles,
>>
>> To make it run faster, and actually make it past the first timestep, we
>> have increased our tolerances significantly: ksp_atol (1.0e-7) <
>> zero_tolerance (1.0e-6) < snes_atol (1.0e-5). Turning off the faults gave
>> us results where the deformation field from the quasi-static boundaries
>> looked as expected, so I don’t believe the problem is with our mesh. I’ve
>> notice that when we increase the mesh discretization that the simulations
>> run longer (as in they make it to further time steps) before ending with
>> the DIVERGED_FUNCTION_COUNT error. We are working on implementing the exact
>> solver.
>>
>> In the meantime, the ksp for the faults seems to be what is causing the
>> error we are receiving. The ksp_sub has a divergence set at 10,000. Is
>> there a way to increase this?
>>
>> Thanks,
>> Bobby
>>
>>
>> From: CIG-SHORT [mailto:cig-short-bounces at geodynamics.org <mailto:
>> cig-short-bounces at geodynamics.org>] On Behalf Of Charles Williams
>> Sent: Monday, February 29, 2016 8:26 PM
>> To: cig-short <cig-short at geodynamics.org <mailto:
>> cig-short at geodynamics.org>>
>> Subject: Re: [CIG-SHORT] Nonlinear solve diverged_function_count
>>
>> Hi Bobby,
>>
>> Two things I might try are:
>>
>> 1.  Turn off the faults and see what convergence looks like with just
>> your external boundary conditions.  This will make sure there is not some
>> issue with your mesh or normalization.
>> 2.  If the linear convergence looks good in that case, try using the
>> exact solver for the fault and see if that works.
>>
>> Cheers,
>> Charles
>>
>>
>> On 1/03/2016, at 10:05 AM, Bobak Karimi <bkarimi at clarion.edu <mailto:
>> bkarimi at clarion.edu>> wrote:
>>
>> 1.      Is this a 2D or 3D problem, and how large is it?
>> a.       It is a 2D problem and has around 13,000 cells (dimension wise
>> it’s about 400 km long and 300 km wide)
>> 2.      Is it a single fault or multiple faults?
>> a.       Multiple faults. One through-going, and several intersecting
>> faults.
>> 3.      What does the convergence for the linear solver look like (slow
>> convergence, large number of iterations, etc.)?
>> a.       Convergence is pretty slow, iterations around 2,800.
>> 4.      Have you tried using an exact solver for the fault (look in
>> pylith/share/settings)?
>> a.       We haven’t tried an exact solver.
>> 5.      Is your mesh of high quality?
>> a.       The mesh quality is high quality.
>>
>>
>> From: CIG-SHORT [mailto:cig-short-bounces at geodynamics.org <mailto:
>> cig-short-bounces at geodynamics.org>] On Behalf Of Charles Williams
>> Sent: Monday, February 29, 2016 3:00 PM
>> To: cig-short <cig-short at geodynamics.org <mailto:
>> cig-short at geodynamics.org>>
>> Subject: Re: [CIG-SHORT] Nonlinear solve diverged_function_count
>>
>> I guess it might help to know more about your problem and what the
>> current convergences are like.  I see that you have really large values for
>> your maximum iterations.  Have those been necessary?  Here are some
>> questions for you:
>>
>> 1.  Is this a 2D or 3D problem, and how large is it?
>> 2.  Is it a single fault or multiple faults?
>> 3.  What does the convergence for the linear solver look like (slow
>> convergence, large number of iterations, etc.)?
>> 4.  Have you tried using an exact solver for the fault (look in
>> pylith/share/settings)?
>> 5.  Is your mesh of high quality?
>>
>> That’s all I can think of right now, but let me know if you make any
>> progress on this.
>>
>> Cheers,
>> Charles
>>
>>
>> On 1/03/2016, at 3:14 AM, Bobak Karimi <bkarimi at clarion.edu <mailto:
>> bkarimi at clarion.edu>> wrote:
>>
>> Hi Charles,
>>
>> The tight factors for rtol were purposeful to force the controlling
>> tolerance to be the atol. This was what I had gleaned from session iv,
>> step03 in the 2015 pylith tutorial. My PetSc values are below:
>>
>> # PETSc
>> # ----------------------------------------------------------------------
>> # Set the solver options.
>>
>> [pylithapp.petsc]
>>
>> # Preconditioner settings.
>> pc_type = asm
>> sub_pc_factor_shift_type = nonzero
>>
>> # Convergence parameters.
>> ksp_rtol = 1.0e-20
>> ksp_atol = 1.0e-11
>> ksp_max_it = 1000000
>> ksp_gmres_restart = 100
>>
>> # Linear solver monitoring options.
>> ksp_monitor = true
>> ksp_view = true
>> ksp_converged_reason = true
>>
>> # Nonlinear solver monitoring options.
>> snes_rtol = 1.0e-20
>> snes_atol = 1.0e-9
>> snes_max_it = 1000000
>> snes_monitor = true
>> snes_view = true
>> snes_converged_reason = true
>> snes_error_if_not_converged = true
>>
>> # PETSc summary -- useful for performance information.
>> log_summary = true
>>
>> # Uncomment to launch gdb when starting PyLith.
>> # start_in_debugger = true
>>
>>
>> # End of file
>>
>> From: CIG-SHORT [mailto:cig-short-bounces at geodynamics.org <mailto:
>> cig-short-bounces at geodynamics.org>] On Behalf Of Charles Williams
>> Sent: Sunday, February 28, 2016 2:57 PM
>> To: cig-short <cig-short at geodynamics.org <mailto:
>> cig-short at geodynamics.org>>
>> Subject: Re: [CIG-SHORT] Nonlinear solve diverged_function_count
>>
>> Dear Bobby,
>>
>> It’s hard to say without seeing all of your settings, but those seem like
>> pretty tight values for rtol.  Is there a reason you are setting them so
>> small?
>>
>> Cheers,
>> Charles
>>
>>
>> On 27/02/2016, at 6:36 AM, Bobak Karimi <bkarimi at clarion.edu <mailto:
>> bkarimi at clarion.edu>> wrote:
>>
>> Hello,
>>
>> I recently got this error on a simulation I was running, and am not sure
>> how to apply a fix for it:
>>
>> Nonlinear solve did not converge due to DIVERGED_FUNCTION_COUNT
>> iterations 2743
>>
>> My KSP and NSES rtol = 1.0e-20
>> KSP_atol = 1.0e-11
>> SNES_atol = 1.0e-9
>>
>> The zero-tolerance on my faults is 1.0e-10.
>>
>> Any help would be much appreciated,
>>
>> Thanks!
>> Bobby
>>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>
>> Charles A. Williams
>> Scientist
>> GNS Science
>> 1 Fairway Drive, Avalon
>> PO Box 30368
>> Lower Hutt  5040
>> New Zealand
>> ph (office): 0064-4570-4566
>> fax (office): 0064-4570-4600
>> C.Williams at gns.cri.nz <mailto:C.Williams at gns.cri.nz>
>>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>
>> Charles A. Williams
>> Scientist
>> GNS Science
>> 1 Fairway Drive, Avalon
>> PO Box 30368
>> Lower Hutt  5040
>> New Zealand
>> ph (office): 0064-4570-4566
>> fax (office): 0064-4570-4600
>> C.Williams at gns.cri.nz <mailto:C.Williams at gns.cri.nz>
>>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>
>> Charles A. Williams
>> Scientist
>> GNS Science
>> 1 Fairway Drive, Avalon
>> PO Box 30368
>> Lower Hutt  5040
>> New Zealand
>> ph (office): 0064-4570-4566
>> fax (office): 0064-4570-4600
>> C.Williams at gns.cri.nz <mailto:C.Williams at gns.cri.nz>
>>
>> _______________________________________________
>> CIG-SHORT mailing list
>> CIG-SHORT at geodynamics.org <mailto:CIG-SHORT at geodynamics.org>
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short <
>> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/cig-short>
>>
> Charles A. Williams
> Scientist
> GNS Science
> 1 Fairway Drive, Avalon
> PO Box 30368
> Lower Hutt  5040
> New Zealand
> ph (office): 0064-4570-4566
> fax (office): 0064-4570-4600
> C.Williams at gns.cri.nz <mailto:C.Williams at gns.cri.nz>
>
>
>
>


-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/cig-short/attachments/20160302/d1a21766/attachment.html>


More information about the CIG-SHORT mailing list