<div dir="ltr">Hi,<div><br></div><div>I'm using GAMG + GMRES for my Poisson problem. The solver converges with KSP_CONVERGED_STEP_LENGTH at a residual of 9.773346857844e-02, which is much higher than what I need (I need a tolerance of at least 1E-8). I am not able to figure out which tolerance I need to set to avoid convergence due to CONVERGED_STEP_LENGTH.</div><div><br></div><div>Any help is appreciated! Output of -ksp_view and -ksp_monitor:</div><div><br></div><div><div>    0 KSP Residual norm 3.121347818142e+00 </div><div>    1 KSP Residual norm 9.773346857844e-02 </div><div>  Linear solve converged due to CONVERGED_STEP_LENGTH iterations 1</div><div>KSP Object: 1 MPI processes</div><div>  type: gmres</div><div>    GMRES: restart=30, using Classical (unmodified) Gram-Schmidt Orthogonalization with no iterative refinement</div><div>    GMRES: happy breakdown tolerance 1e-30</div><div>  maximum iterations=10000, initial guess is zero</div><div>  tolerances:  relative=1e-08, absolute=1e-50, divergence=10000</div><div>  left preconditioning</div><div>  using PRECONDITIONED norm type for convergence test</div><div>PC Object: 1 MPI processes</div><div>  type: gamg</div><div>    MG: type is MULTIPLICATIVE, levels=2 cycles=v</div><div>      Cycles per PCApply=1</div><div>      Using Galerkin computed coarse grid matrices</div><div>  Coarse grid solver -- level -------------------------------</div><div>    KSP Object:    (mg_coarse_)     1 MPI processes</div><div>      type: preonly</div><div>      maximum iterations=1, initial guess is zero</div><div>      tolerances:  relative=1e-05, absolute=1e-50, divergence=10000</div><div>      left preconditioning</div><div>      using NONE norm type for convergence test</div><div>    PC Object:    (mg_coarse_)     1 MPI processes</div><div>      type: bjacobi</div><div>        block Jacobi: number of blocks = 1</div><div>        Local solve is same for all blocks, in the following KSP and PC objects:</div><div>        KSP Object:        (mg_coarse_sub_)         1 MPI processes</div><div>          type: preonly</div><div>          maximum iterations=1, initial guess is zero</div><div>          tolerances:  relative=1e-05, absolute=1e-50, divergence=10000</div><div>          left preconditioning</div><div>          using NONE norm type for convergence test</div><div>        PC Object:        (mg_coarse_sub_)         1 MPI processes</div><div>          type: lu</div><div>            LU: out-of-place factorization</div><div>            tolerance for zero pivot 2.22045e-14</div><div>            using diagonal shift on blocks to prevent zero pivot [INBLOCKS]</div><div>            matrix ordering: nd</div><div>            factor fill ratio given 5, needed 1.91048</div><div>              Factored matrix follows:</div><div>                Mat Object:                 1 MPI processes</div><div>                  type: seqaij</div><div>                  rows=284, cols=284</div><div>                  package used to perform factorization: petsc</div><div>                  total: nonzeros=7726, allocated nonzeros=7726</div><div>                  total number of mallocs used during MatSetValues calls =0</div><div>                    using I-node routines: found 133 nodes, limit used is 5</div><div>          linear system matrix = precond matrix:</div><div>          Mat Object:           1 MPI processes</div><div>            type: seqaij</div><div>            rows=284, cols=284</div><div>            total: nonzeros=4044, allocated nonzeros=4044</div><div>            total number of mallocs used during MatSetValues calls =0</div><div>              not using I-node routines</div><div>      linear system matrix = precond matrix:</div><div>      Mat Object:       1 MPI processes</div><div>        type: seqaij</div><div>        rows=284, cols=284</div><div>        total: nonzeros=4044, allocated nonzeros=4044</div><div>        total number of mallocs used during MatSetValues calls =0</div><div>          not using I-node routines</div><div>  Down solver (pre-smoother) on level 1 -------------------------------</div><div>    KSP Object:    (mg_levels_1_)     1 MPI processes</div><div>      type: chebyshev</div><div>        Chebyshev: eigenvalue estimates:  min = 0.195339, max = 4.10212</div><div>      maximum iterations=2</div><div>      tolerances:  relative=1e-05, absolute=1e-50, divergence=10000</div><div>      left preconditioning</div><div>      using nonzero initial guess</div><div>      using NONE norm type for convergence test</div><div>    PC Object:    (mg_levels_1_)     1 MPI processes</div><div>      type: sor</div><div>        SOR: type = local_symmetric, iterations = 1, local iterations = 1, omega = 1</div><div>      linear system matrix = precond matrix:</div><div>      Mat Object:      ()       1 MPI processes</div><div>        type: seqaij</div><div>        rows=9036, cols=9036</div><div>        total: nonzeros=192256, allocated nonzeros=192256</div><div>        total number of mallocs used during MatSetValues calls =0</div><div>          not using I-node routines</div><div>  Up solver (post-smoother) same as down solver (pre-smoother)</div><div>  linear system matrix = precond matrix:</div><div>  Mat Object:  ()   1 MPI processes</div><div>    type: seqaij</div><div>    rows=9036, cols=9036</div><div>    total: nonzeros=192256, allocated nonzeros=192256</div><div>    total number of mallocs used during MatSetValues calls =0</div><div>      not using I-node routines</div></div><div><br></div><div>Thanks,</div><div>Harshad</div></div>