[petsc-users] Prometheus vs GAMG for elasticity/plasticity problems

Thomas Gross tgross at ilsb.tuwien.ac.at
Mon Jan 27 14:29:49 CST 2014


I was using a Newton Loop in Feap with a higher accuracy. This caused FEAP8.4 to call KSPSolve with GAMG 3 times but FEAP8.3 to call KSPSolve with Prometheus only 1 time.
I have now used a larger mesh and adapted the FEAP solve file to call KSPSolve only once for GAMG and Prometheus. However, Prometheus is about 3 times faster then GAMG (see attached log files).

Prometheus:
-ksp_type cg -pc_type prometheus -log_summary -ksp_monitor -ksp_view -options_left > Prometheus_Large_Log.txt

Gamg:
-ksp_type cg -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -log_summary -ksp_monitor -ksp_view -options_left -mg_levels_ksp_max_it 1 > GAMG_Large_max_it_log.txt
-ksp_type cg -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -log_summary -ksp_monitor -ksp_view -options_left mg_levels_ksp_type richardson -mg_levels_pc_type sor > GAMG_Large_Rich_log.txt

Best regards,
Thomas

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Prometheus_Large_Log.txt
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140127/a23220d0/attachment-0003.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GAMG_Large_max_it_log.txt
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140127/a23220d0/attachment-0004.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: GAMG_Large_Rich_log.txt
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140127/a23220d0/attachment-0005.txt>
-------------- next part --------------

On Jan 27, 2014, at 7:00 PM, Jed Brown <jed at jedbrown.org> wrote:

> Thomas Gross <tgross at ilsb.tuwien.ac.at> writes:
> 
>> I ran it with:
>> -ksp_type cg -pc_type gamg -pc_gamg_type agg -log_summary -ksp_monitor -ksp_view -options_left -mg_levels_ksp_max_it 1 > GAMG_log_max_it.txt
>> and
>> -ksp_type cg -pc_type gamg -pc_gamg_type agg -log_summary -ksp_monitor -ksp_view -options_left -mg_levels_ksp_type richardson -mg_levels_pc_type sor > GAMG_log_Rich.txt
>> (Log files attached)
>> 
>> However, the solution time did not decrease and I still needed to call KSPSolve 3 times although I had -mg_levels_ksp_max_it 1. 
> 
> Your original Prometheus output had
> 
>  KSPSolve               1 1.0 4.6679e-02 1.0 4.10e+07 1.2 3.0e+02 2.7e+03 1.9e+02 34100 99100 86  34100 99100 87  1631
> 
> Now you have
> 
> Cheby(2)/Jacobi
> 
>  KSPSolve               3 1.0 1.3235e-01 1.0 3.36e+07 1.0 8.5e+02 2.3e+03 1.2e+03 36100 99100 96  36100 99100 96   507
> 
> Cheby(1)/Jacobi
> 
>  KSPSolve               3 1.0 1.3466e-01 1.0 3.28e+07 1.0 8.5e+02 2.3e+03 1.2e+03 49100 99100 96  49100 99100 96   486
> 
> Richardson/SOR
> 
>  KSPSolve               3 1.0 1.2476e-01 1.0 3.36e+07 1.0 7.0e+02 2.4e+03 1.2e+03 38100 99100 96  38100 99100 96   538
> 
> 
> The cost _per solve_ looks fine here, so why do you/FEAP call KSPSolve
> three times when using GAMG, going to a residual norm of 1e-16 when you
> were only going to rtol 1e-8 with Prometheus?  For example, here is the
> convergence the With Prometheus:
> 
>    0 KSP Residual norm 1.444126847260e-01 
>    1 KSP Residual norm 5.357525404213e-03 
>    2 KSP Residual norm 1.471040678379e-03 
>    3 KSP Residual norm 3.704652302293e-04 
>    4 KSP Residual norm 9.809180893460e-05 
>    5 KSP Residual norm 3.175497350277e-05 
>    6 KSP Residual norm 8.859979496890e-06 
>    7 KSP Residual norm 2.071384344082e-06 
>    8 KSP Residual norm 5.035483717523e-07 
>    9 KSP Residual norm 1.516500637412e-07 
>   10 KSP Residual norm 5.134577847338e-08 
>   11 KSP Residual norm 1.270806138401e-08 
>   12 KSP Residual norm 3.074793756862e-09 
>   13 KSP Residual norm 1.048189477307e-09 
> 
> and here is with GAMG Richardson/SOR:
> 
>    0 KSP Residual norm 1.407866441446e-01 
>    1 KSP Residual norm 6.331036946837e-03 
>    2 KSP Residual norm 2.744397946950e-04 
>    3 KSP Residual norm 1.419791977305e-05 
>    4 KSP Residual norm 7.670137315396e-07 
>    5 KSP Residual norm 4.636628100571e-08 
>    6 KSP Residual norm 3.374396803942e-09 
>    7 KSP Residual norm 1.936237763969e-10 
> 
> The latter has reduced the residual more (in preconditioned norm) in
> half the iterations.  Try running with -ksp_norm_type unpreconditioned
> if you're concerned about the accuracy of the GAMG solve.



More information about the petsc-users mailing list