[petsc-users] gamg problem

Mark Adams mfadams at lbl.gov
Wed Jul 8 11:53:11 CDT 2015


What version of PETSc are you using?  This has been changing recently.

-help will show you the parameters for each level, like
-mg_levels_1_eigest_ksp_type <GMRES>.  PETSc provides syntactic sugar to do
all levels by removing the "_1".

On Wed, Jul 8, 2015 at 3:57 PM, Benoit Fabrèges <benoit.fabreges at inria.fr>
wrote:

> Hi,
> thank you for the answer. I tried to change the ksp to cg to estimate the
> eigenvalues like you propose but petsc doesn't find the option:
>
> mpirun -n 8 ./ex54 -ne 1023 -ksp_rtol 1e-10 -ksp_monitor_true_residual
> -options_left -mg_levels_esteig_ksp_type cg
>  0 KSP preconditioned resid norm 2.489979017016e+03 true resid norm
> 9.779947596961e-04 ||r(i)||/||b|| 1.000000000000e+00
>  1 KSP preconditioned resid norm 5.415647207494e+01 true resid norm
> 6.738962907374e-02 ||r(i)||/||b|| 6.890592041073e+01
>  2 KSP preconditioned resid norm 1.646483778031e+01 true resid norm
> 4.789220846312e-03 ||r(i)||/||b|| 4.896980069505e+00
>  3 KSP preconditioned resid norm 1.915371795016e+00 true resid norm
> 4.570471306345e-03 ||r(i)||/||b|| 4.673308584767e+00
>  4 KSP preconditioned resid norm 1.234057146730e+00 true resid norm
> 5.812076545460e-03 ||r(i)||/||b|| 5.942850396526e+00
> #PETSc Option Table entries:
> -ksp_monitor_true_residual
> -ksp_rtol 1e-10
> -mg_levels_esteig_ksp_type cg
> -ne 1023
> -options_left
> #End of PETSc Option Table entries
> There is one unused database option. It is:
> Option left: name:-mg_levels_esteig_ksp_type value: cg
>
> I could not find it either by adding -help to get all the possible options.
> By the way, if I reverse the order of the option -options-left and
> -mg_levels_esteig_ksp_type cg, it doesn't print the left options at the end
> anymore.
>
> Is there something else to change apart from the option
> -mg_levels_esteig_ksp_type cg ?
>
> Thanks,
> Benoit
>
>
>
> On Wed 08 Jul 2015 03:31:32 PM CEST, Mark Adams wrote:
>
>> Sorry for the delay. The problem is that the eigen estimates are bad
>> for the Chebyshev smoother.  Unfortunately this fails catastrophically.
>>
>> First, I do not understand why we do not get an error message here:
>>
>> 13:57 PICell> ~/Codes/petsc/src/ksp/ksp/examples/tutorials$ mpirun -n
>> 8 ./ex54 -ne 1023 -ksp_rtol 1e-10 -ksp_monitor_true_residual
>> -options_left
>>   0 KSP preconditioned resid norm 2.408779787997e+03 true resid norm
>> 9.779947596963e-04 ||r(i)||/||b|| 1.000000000000e+00
>>   1 KSP preconditioned resid norm 6.605106317291e+01 true resid norm
>> 6.550622855055e-02 ||r(i)||/||b|| 6.698014268593e+01
>>   2 KSP preconditioned resid norm 2.105905914541e+01 true resid norm
>> 5.536477156386e-03 ||r(i)||/||b|| 5.661049920253e+00
>>   3 KSP preconditioned resid norm 2.775390521485e+00 true resid norm
>> 1.822171753713e-03 ||r(i)||/||b|| 1.863171285579e+00
>>   4 KSP preconditioned resid norm 6.367933585867e-01 true resid norm
>> 2.173992967507e-03 ||r(i)||/||b|| 2.222908605545e+00
>> #PETSc Option Table entries:
>> -ksp_monitor_true_residual
>> -ksp_rtol 1e-10
>> -ne 1023
>> -options_left
>> #End of PETSc Option Table entries
>> There are no unused options.
>>
>> It just stops.  What is going on here?????
>>
>> A problem is that GMRES is the default it is not accuare.  CG is much
>> better.  I will add this to all tests (54, 55, 56) that use Cheby.
>> Here is what we get with CG:
>>
>> 14:12 PICell> ~/Codes/petsc/src/ksp/ksp/examples/tutorials$ mpirun -n
>> 8 ./ex54 -ne 1023 -ksp_rtol 1e-10 -ksp_monitor_true_residual
>> -mg_levels_esteig_ksp_type cg
>>   0 KSP preconditioned resid norm 2.397141111771e+03 true resid norm
>> 9.779947596963e-04 ||r(i)||/||b|| 1.000000000000e+00
>>   1 KSP preconditioned resid norm 6.398367771703e+01 true resid norm
>> 5.969698581458e-02 ||r(i)||/||b|| 6.104018986064e+01
>>   2 KSP preconditioned resid norm 2.025487152015e+01 true resid norm
>> 4.795534114089e-03 ||r(i)||/||b|| 4.903435388118e+00
>>   3 KSP preconditioned resid norm 2.693141357521e+00 true resid norm
>> 1.392786125856e-03 ||r(i)||/||b|| 1.424124323824e+00
>>   4 KSP preconditioned resid norm 6.147511674674e-01 true resid norm
>> 2.801964778489e-04 ||r(i)||/||b|| 2.865010012281e-01
>>   5 KSP preconditioned resid norm 1.133515586579e-01 true resid norm
>> 3.760895077288e-05 ||r(i)||/||b|| 3.845516594031e-02
>>   6 KSP preconditioned resid norm 1.169295614319e-02 true resid norm
>> 5.672568123760e-06 ||r(i)||/||b|| 5.800202984239e-03
>>   7 KSP preconditioned resid norm 1.281609546752e-03 true resid norm
>> 8.103035520325e-07 ||r(i)||/||b|| 8.285356787434e-04
>>   8 KSP preconditioned resid norm 1.898415766718e-04 true resid norm
>> 1.250723051310e-07 ||r(i)||/||b|| 1.278864778067e-04
>>   9 KSP preconditioned resid norm 3.325790135426e-05 true resid norm
>> 2.304415060174e-08 ||r(i)||/||b|| 2.356265243067e-05
>>  10 KSP preconditioned resid norm 8.224698701048e-06 true resid norm
>> 4.786148212120e-09 ||r(i)||/||b|| 4.893838299917e-06
>>  11 KSP preconditioned resid norm 1.224414108364e-06 true resid norm
>> 7.170267325093e-10 ||r(i)||/||b|| 7.331600966164e-07
>>  12 KSP preconditioned resid norm 1.760480053719e-07 true resid norm
>> 1.005681798001e-10 ||r(i)||/||b|| 1.028310006807e-07
>>
>> So all is well.
>>
>> Thanks for pointing this out.
>> Mark
>>
>> On Thu, Jul 2, 2015 at 5:38 PM, Benoit Fabrèges
>> <benoit.fabreges at inria.fr <mailto:benoit.fabreges at inria.fr>> wrote:
>>
>>     Dear PETSc developers,
>>     I updated from 3.4 to 3.6 and I have a strange behavior with the
>>     GAMG preconditioner. I am running ex54 with the following options:
>>     -ne 1023 -ksp_rtol 1e-10 -ksp_monitor_true_residual -options_left
>>
>>     I don't have the same behavior depending on the number of process
>>     used. It is for example not converging with 8 and 12 process with
>>     the reason KSP_DIVERGED_INDEFINITE_PC but it is working fine in
>>     other cases (I didn't try with more than 12 process).
>>
>>     Do you have the same behavior ? It is working fine with 3.4 version.
>>
>>     Best,
>>
>>     Benoit
>>
>>
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20150708/4d6ac3cd/attachment.html>


More information about the petsc-users mailing list