[petsc-dev] gamg regression

Stephan Kramer s.kramer at imperial.ac.uk
Wed Jun 17 13:03:06 CDT 2015


On 17/06/15 17:37, Mark Adams wrote:
>
>
>         Second question (less important): I didn't manage to change this
>         at the command line. I would have thought -mg_coarse_ksp_type
>         preonly should have done the trick but seemed to be ignored.
>         Instead I had to do it with some calls in the code:
>
>
>
> Humm, this seems to work for me (I just cut and pasted this).  Can you
> try using -options_left.
>

It does pick up the -mg_coarse_ksp_type option (so it's not printed with 
-options_left) but gets overwritten later on. I've been tracing the 
various calls to KSPSetType() and it seems to be doing the following 
with the ksp of the coarse solve:

1) it sets it to KSPCHEBY on mg.c:226
2) it overwrites it with KSPPREONLY on mg.c:240 - I guess this is the 
expected behaviour
3) it sets it to KSPPREONLY again on mg.c:717 via KSPSetFromOptions - 
that is, it's picking up the "-mg_coarse_ksp_type preonly" option
4) it sets it back to KSPGMRES on mg.c:806 - because it seems to think 
that the coarse solve is not a direct solve and therefore shouldn't be 
using preonly. The reason for this is that the direct solve is wrapped 
in a PCBJACOBI (gamg.c:713) and therefore the pctype of mg_coarse is not 
PCLU but PCBJACOBI

(all line numbers refer to petsc master)

So I'm guessing it's that last one causing me trouble

Cheers
Stephan




More information about the petsc-dev mailing list