[petsc-dev] gamg regression
Mark Adams
mfadams at lbl.gov
Wed Jun 17 15:09:14 CDT 2015
Thanks,
There are two problems: 1) GAMG is not setting PREONLY & 2) PCSetup_MG sets
the coarse grid KSP, with bjacobi/lu, to GMRES. I have made a pull request
in to fix this.
You seem to be destroying the PC with PCDestroy (or KSPDestroy). Is that
right?
Can you please test this and see if works, without your fix?
'git fetch; git checkout mark/gamg-crs',
Mark
On Wed, Jun 17, 2015 at 1:03 PM, Stephan Kramer <s.kramer at imperial.ac.uk>
wrote:
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20150617/9d753457/attachment.html>
More information about the petsc-dev
mailing list