[petsc-users] DIVERGED_NANORING with PC GAMG

Mark Adams mfadams at lbl.gov
Wed Oct 31 11:43:54 CDT 2018


On Tue, Oct 30, 2018 at 5:23 PM Appel, Thibaut via petsc-users <
petsc-users at mcs.anl.gov> wrote:

> Dear users,
>
> Following a suggestion from Matthew Knepley I’ve been trying to apply
> fieldsplit/gamg for my set of PDEs but I’m still encountering issues
> despite various tests. pc_gamg simply won’t start.
> Note that direct solvers always yield the correct, physical result.
> Removing the fieldsplit to focus on the gamg bit and trying to solve the
> linear system on a modest size problem still gives, with
>
> '-ksp_monitor -ksp_rtol 1.0e-10 -ksp_gmres_restart 300 -ksp_type gmres
> -pc_type gamg'
>
> [3]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [3]PETSC ERROR: Petsc has generated inconsistent data
> [3]PETSC ERROR: Have un-symmetric graph (apparently). Use
> '-(null)pc_gamg_sym_graph true' to symetrize the graph or
> '-(null)pc_gamg_threshold -1' if the matrix is structurally symmetric.
>
> And since then, after adding '-pc_gamg_sym_graph true' I have been getting
> [0]PETSC ERROR: --------------------- Error Message
> --------------------------------------------------------------
> [0]PETSC ERROR: Petsc has generated inconsistent data
> [0]PETSC ERROR: Eigen estimator failed: DIVERGED_NANORINF at iteration
>
> -ksp_chebyshev_esteig_noisy 0/1 does not change anything
>
> Knowing that Chebyshev eigen estimator needs a positive spectrum I tried
> ‘-mg_levels_ksp_type gmres’ but iterations would just go on endlessly.
>

This is OK, but you need to use '-ksp_type *f*gmres' (this could be why it
is failing ...).

It looks like your matrix is 1) just the velocity field and 2) very
unsymmetric (eg, convection dominated). I would start with
‘-mg_levels_ksp_type richardson -mg_levels_pc_type sor’.

I would also start with unsmoothed aggregation: '-pc_gamg_nsmooths 0'


>
> It seems that I have indeed eigenvalues of rather high magnitude in the
> spectrum of my operator without being able to determine the reason.
> The eigenvectors look like small artifacts at the wall-inflow or
> wall-outflow corners with zero anywhere else but I do not know how to
> interpret this.
> Equations are time-harmonic linearized Navier-Stokes to which a forcing is
> applied, there’s no time-marching.
>

You mean you are in frequency domain?


>
> Matrix is formed with a MPIAIJ type. The formulation is incompressible, in
> complex arithmetic and the 2D physical domain is mapped to a logically
> rectangular,


This kind of messes up the null space that AMG depends on but AMG theory is
gone for NS anyway.


> regular collocated grid with a high-order finite difference method.
> I determine the ownership of the rows/degrees of freedom of the matrix
> with PetscSplitOwnership and I’m not using DMDA.
>

Our iterative solvers are probably not going to work well on this but you
should test hypre also (-pc_type hypre -pc_hypre_type boomeramg). You need
to configure PETSc to download hypre.

Mark


>
> The Fortran application code is memory-leak free and has undergone a
> strict verification/validation procedure for different variations of the
> PDEs.
>
> If there’s any problem with the matrix what could help for the diagnostic?
> At this point I’m running out of ideas so I would really appreciate
> additional suggestions and discussions.
>
> Thanks for your continued support,
>
>
> Thibaut
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20181031/eb6d3e78/attachment-0001.html>


More information about the petsc-users mailing list