Matthew Knepley writes:
> On Fri, Sep 28, 2018 at 7:43 AM Michael Werner
> <michael.wer...@dlr.de>
> wrote:
>
>>
>> Matthew Knepley writes:
>>
>> > On Fri, Sep 28, 2018 at 3:23 AM Michael Werner
>> > <michael.wer...@dlr.de>
>> > wrote:
>> >
>> >> Hello,
>> >>
>> >> I'm having trouble with getting the AMG preconditioners
>> >> working. I
>> >> tried all of them (gamg, ml, hypre-boomeramg), with
>> >> varying
>> >> degrees of "success":
>> >>
>> >> - GAMG:
>> >> CMD options: -ksp_rtol 1e-8 -ksp_monitor_true_residual
>> >> -ksp_max_it
>> >> 20 -ksp_type fgmres -pc_type gamg -pc_gamg_sym_graph TRUE
>> >> -pc_gamg_agg_nsmooths 1 -ksp_view
>> >> always crashes with the following error:
>> >> Error: error code 77
>> >> [0] KSPSolve() line 780 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/ksp/interface/itfunc.c
>> >> [0] KSPSolve_GMRES() line 233 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/ksp/impls/gmres/gmres.c
>> >> [0] KSPInitialResidual() line 67 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/ksp/interface/itres.c
>> >> [0] KSP_PCApply() line 281 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/include/petsc/private/kspimpl.h
>> >> [0] PCApply() line 462 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/pc/interface/precon.c
>> >> [0] PCApply_MG() line 377 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/pc/impls/mg/mg.c
>> >> [0] PCMGMCycle_Private() line 20 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/pc/impls/mg/mg.c
>> >> [0] KSPSolve() line 780 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/ksp/interface/itfunc.c
>> >> [0] KSPSolve_Chebyshev() line 381 in
>> >>
>> >>
>>
/home/yoda/wern_mc/Programme/Anaconda/envs/GSA_27/weitere_programme/petsc-3.10.0/src/ksp/ksp/impls/cheby/cheby.c
>> >> [0] Petsc has generated inconsistent data
>> >> [0] Eigen estimator failed: DIVERGED_NANORINF at
>> >> iteration 0
>> >>
>> >> When I'm using a different solver for
>> >> -mg_levels_ksp_type,
>> >> such
>> >> as
>> >> gmres, GAMG no longer crashes, but I don't see
>> >> convergence
>> >> of
>> >> the
>> >> problem (convergence history and ksp_view output are
>> >> attached
>> >> below).
>> >>
>> >
>> > It uses unpreconditioned GMRES to estimate spectral bounds
>> > for
>> > the operator
>> > before using a Chebychev smoother.
>> > If your matrix does not have a nice, connected, positive
>> > spectrum,
>> > Chebychev will not work. However, the fact that
>> > you get DIVERGED_NANORINF in the estimator tells me that
>> > you
>> > have a problem
>> > in the matrix.
>> >
>>
>> The error above (DIVERGED_NANORINF) only appears for
>> -mg_levels_ksp_type chebyshev. When I use GMRES
>> (-mg_levels_ksp_type gmres) there are no errors, the KSP
>> just
>> never converges.
>>
>> >
>> >> - Hypre
>> >> With the default settings, BoomerAMG just returns a
>> >> Vector
>> >> of
>> >> all
>> >> zeros after one iteration.
>> >> When I change the relaxation type
>> >> -pc_hypre_boomeramg_relax_type_all to Jacobi, I get
>> >> similar
>> >> results than with GAMG: the solver works without errors,
>> >> but
>> >> doesn't converge. The output for Hypre is also attached
>> >> below.
>> >>
>> >> - ML
>> >> With default settings the result is just like Boomeramg:
>> >> a
>> >> vector
>> >> of all zeros after one iteration.
>> >> When I change -mg_levels_ksp_type the behaviour is
>> >> identical
>> >> to
>> >> GAMG.
>> >>
>> >>
>> >> Since none of the packages worked, I'm assuming that the
>> >> error
>> >> lies with me/ my code,
>> >
>> >
>> > It looks like a value in the matrix might be bad.
>> >
>> >
>> >> so I'll give a short overview over what I'm
>> >> trying to do.
>> >> The matrix I'm trying to precondition is the Jacobian of
>> >> a
>> >> flow
>> >> field originating from an unstructured finite-volume CFD
>> >> code.
>
>
> Compressible or incompressible?
>
> Mstt
>
The matrix is generated by a compressible CFD code. The current
test case is quasi-incompressible due to very low flow velocity
(flow around a cylinder).