On Fri, Mar 18, 2022 at 11:44 AM Fabio Durastante <fabio.durasta...@unipi.it> wrote:
> Hi everybody, > > I'm trying to run the rotated anisotropy example ex54f using CG and GAMG > as preconditioner, I run it with the command: > > mpirun -np 2 ./ex54f -ne 1011 \ > -theta 18.0 \ > -epsilon 100.0 \ > -pc_type gamg \ > -pc_gamg_type agg \ > -log_view \ > -log_trace \ > -ksp_view \ > -ksp_monitor \ > -ksp_type cg \ > -mg_levels_pc_type jacobi \ > -mg_levels_ksp_type richardson \ > -mg_levels_ksp_max_it 4 \ > -ksp_atol 1e-9 \ > -ksp_rtol 1e-12 > > But the KSP CG seems to stop just after two iterations: > > 0 KSP Residual norm 6.666655711717e-02 > 1 KSP Residual norm 9.859661350927e-03 > > I'm attaching the full log, the problem seems to appear when I modify the > value of epsilon, if I leave it to the default (1.0) it prints > > 0 KSP Residual norm 5.862074869050e+00 > 1 KSP Residual norm 5.132711016122e-01 > 2 KSP Residual norm 1.198566629717e-01 > 3 KSP Residual norm 1.992885901625e-02 > 4 KSP Residual norm 4.919780086064e-03 > 5 KSP Residual norm 1.417045143681e-03 > 6 KSP Residual norm 3.559622318760e-04 > 7 KSP Residual norm 9.270786187701e-05 > 8 KSP Residual norm 1.886403709163e-05 > 9 KSP Residual norm 2.940634415714e-06 > 10 KSP Residual norm 5.015043022637e-07 > 11 KSP Residual norm 9.760219712757e-08 > 12 KSP Residual norm 2.320857464659e-08 > 13 KSP Residual norm 4.563772507631e-09 > 14 KSP Residual norm 8.896675476997e-10 > > that is very strange because the case with epsilon 1 should be easier. > As Barry said, it failed (use -ksp_converged_reason). You are making it pretty hard with 100. The example uses .1 (ie, 10) You are adding -mg_levels_ksp_type richardson which does work with jacobi. Use sor (instead of jacobi) and it should work. The default ksp_type is chebyshev. > Any help with this would be great. > > Thank you very much, > > Fabio Durastante >