[petsc-dev] GMRES and eigen estimates
Mark F. Adams
mark.adams at columbia.edu
Tue Apr 3 17:48:59 CDT 2012
On Apr 3, 2012, at 5:21 PM, Jed Brown wrote:
> On Tue, Apr 3, 2012 at 14:05, Barry Smith <bsmith at mcs.anl.gov> wrote:
> 2) "I turn off norms for this -- its in the eigen estimate -- because I don't usually want them. " But doesn't GMRES compute the norms always? So why not have the GMRES version still kick out early if the norm reduces by same 10^10 before it ran out of its? (Since the norm is "free" for GMRES there is no harm done, and good things occasionly like your case below.
>
> Yeah, though this is an ideal scenario for TSQR-based GMRES in which case we would have done several iterations with one reduction. You will still have the norms, but I guess we will need to check them and decide which estimates to use. So I guess no problem at this point, but something to keep in mind with spectral estimates using TSQR-based or pipelined (latency-tolerant) GMRES.
>
> Mark, because CG runs in a norm that is stronger with respect to low frequencies/weaker with respect to high frequencies, but we only want an accurate estimate of the highest eigenvalue, I would expect GMRES to give this estimate sooner. Do you not observe this?
Good question. Here is a run with 3 levels so there are two eigen estimates. You are correct, GMRES does converge a little faster for the max and a little slower for the min.
And CG seems to insist on printing a zero residual. I guess this is just a result of avoiding norms.
Mark
CG:
~/Codes/petsc-dev/src/ksp/ksp/examples/tutorials>./ex54 -ne 135 -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -gamg_est_ksp_type cg -gamg_est_ksp_monitor_singular_value
0 KSP Residual norm 0.000000000000e+00 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00
1 KSP Residual norm 0.000000000000e+00 % max 2.677871971586e-01 min 2.677871971586e-01 max/min 1.000000000000e+00
2 KSP Residual norm 0.000000000000e+00 % max 1.178406447035e+00 min 2.782878721360e-02 max/min 4.234487252321e+01
3 KSP Residual norm 0.000000000000e+00 % max 1.295357743832e+00 min 1.289180496594e-02 max/min 1.004791607734e+02
4 KSP Residual norm 0.000000000000e+00 % max 1.377111224506e+00 min 8.245185509227e-03 max/min 1.670200413277e+02
5 KSP Residual norm 0.000000000000e+00 % max 1.416668985429e+00 min 6.233944059431e-03 max/min 2.272508338098e+02
6 KSP Residual norm 0.000000000000e+00 % max 1.437446869526e+00 min 5.139451386677e-03 max/min 2.796887763647e+02
7 KSP Residual norm 0.000000000000e+00 % max 1.451987912145e+00 min 4.353879932532e-03 max/min 3.334928694968e+02
8 KSP Residual norm 0.000000000000e+00 % max 1.461212123742e+00 min 3.836419697129e-03 max/min 3.808791110200e+02
9 KSP Residual norm 0.000000000000e+00 % max 1.468428563039e+00 min 3.443446852826e-03 max/min 4.264414773335e+02
10 KSP Residual norm 0.000000000000e+00 % max 1.473917390061e+00 min 3.155959145931e-03 max/min 4.670267648939e+02
0 KSP Residual norm 0.000000000000e+00 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00
1 KSP Residual norm 0.000000000000e+00 % max 3.731463368297e-01 min 3.731463368297e-01 max/min 1.000000000000e+00
2 KSP Residual norm 0.000000000000e+00 % max 1.140795712107e+00 min 7.606975601408e-02 max/min 1.499670528582e+01
3 KSP Residual norm 0.000000000000e+00 % max 1.246715143294e+00 min 4.723095576523e-02 max/min 2.639614471262e+01
4 KSP Residual norm 0.000000000000e+00 % max 1.304492706010e+00 min 3.548816479478e-02 max/min 3.675852818972e+01
5 KSP Residual norm 0.000000000000e+00 % max 1.339064891066e+00 min 2.928974832799e-02 max/min 4.571786947674e+01
6 KSP Residual norm 0.000000000000e+00 % max 1.364719855308e+00 min 2.585356504039e-02 max/min 5.278652492125e+01
7 KSP Residual norm 0.000000000000e+00 % max 1.383366179924e+00 min 2.423653250617e-02 max/min 5.707772675699e+01
8 KSP Residual norm 0.000000000000e+00 % max 1.397180344396e+00 min 2.360451873573e-02 max/min 5.919122351268e+01
9 KSP Residual norm 0.000000000000e+00 % max 1.411141928238e+00 min 2.338719976968e-02 max/min 6.033821672262e+01
10 KSP Residual norm 0.000000000000e+00 % max 1.421660786467e+00 min 2.330914344796e-02 max/min 6.099154993152e+01
GMRES:
~/Codes/petsc-dev/src/ksp/ksp/examples/tutorials>./ex54 -ne 135 -pc_type gamg -pc_gamg_type agg -pc_gamg_agg_nsmooths 1 -gamg_est_ksp_type gmres -gamg_est_ksp_monitor_singular_value
0 KSP Residual norm 1.273195256718e+04 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00
1 KSP Residual norm 1.105116503803e+04 % max 5.381869113825e-01 min 5.381869113825e-01 max/min 1.000000000000e+00
2 KSP Residual norm 1.072035851222e+04 % max 1.198853107985e+00 min 1.128336750138e-01 max/min 1.062495844293e+01
3 KSP Residual norm 1.040578603788e+04 % max 1.310149119205e+00 min 4.889198675168e-02 max/min 2.679680672129e+01
4 KSP Residual norm 1.008271525691e+04 % max 1.385046534385e+00 min 2.794700407793e-02 max/min 4.955974996542e+01
5 KSP Residual norm 9.750140943634e+03 % max 1.420473714424e+00 min 1.875174857832e-02 max/min 7.575153370318e+01
6 KSP Residual norm 9.411807961244e+03 % max 1.439921821395e+00 min 1.387796837899e-02 max/min 1.037559520294e+02
7 KSP Residual norm 9.086106432868e+03 % max 1.453546997206e+00 min 1.093316796595e-02 max/min 1.329483825488e+02
8 KSP Residual norm 8.751995357843e+03 % max 1.462345097587e+00 min 8.917066518085e-03 max/min 1.639939653497e+02
9 KSP Residual norm 8.415392503374e+03 % max 1.469281241117e+00 min 7.482031676039e-03 max/min 1.963746352241e+02
10 KSP Residual norm 8.055020510666e+03 % max 1.474568667828e+00 min 6.374839697111e-03 max/min 2.313107055062e+02
0 KSP Residual norm 3.418335802887e+04 % max 1.000000000000e+00 min 1.000000000000e+00 max/min 1.000000000000e+00
1 KSP Residual norm 2.716382450945e+04 % max 6.064797825097e-01 min 6.064797825097e-01 max/min 1.000000000000e+00
2 KSP Residual norm 2.382340806549e+04 % max 1.166216020692e+00 min 1.546654696000e-01 max/min 7.540248147875e+00
3 KSP Residual norm 2.048023676521e+04 % max 1.257700703560e+00 min 8.148891675652e-02 max/min 1.543400935514e+01
4 KSP Residual norm 1.743857244361e+04 % max 1.313218000974e+00 min 5.610179228991e-02 max/min 2.340777268198e+01
5 KSP Residual norm 1.474980880589e+04 % max 1.344309319181e+00 min 4.280428232291e-02 max/min 3.140595394264e+01
6 KSP Residual norm 1.182847619123e+04 % max 1.369057924040e+00 min 3.409813951386e-02 max/min 4.015051681876e+01
7 KSP Residual norm 8.561286364831e+03 % max 1.384773801525e+00 min 2.854304939538e-02 max/min 4.851527187384e+01
8 KSP Residual norm 5.288348832980e+03 % max 1.397116352802e+00 min 2.549931586128e-02 max/min 5.479034654900e+01
9 KSP Residual norm 2.172952130623e+03 % max 1.407520362981e+00 min 2.415200955394e-02 max/min 5.827756733192e+01
10 KSP Residual norm 9.782158609491e+02 % max 1.412688603202e+00 min 2.394214391587e-02 max/min 5.900426495498e+01
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20120403/f466767b/attachment.html>
More information about the petsc-dev
mailing list