Description how to reproduce the bug
The current GMRES implementation uses inconsistent convergence criteria in the outer and inner loops. The outer loop uses the criterion conv_cond while the inner loop always uses tol * ||r_0||.
Run a simple test using LinSolverIterativeFGMRES on the CPU with an identity right preconditioner and the following parameters:
conv_cond = 0
tol = 0.9
restart = 2
maxit = 10
- non-flexible GMRES
With conv_cond = 0 convergence should require the residual norm to be no greater than machine epsilon but the inner loop uses
tol_rel = tol * ||r_0|| ≈ 1.27279.
The inner loop terminates after one iteration because the estimated residual (~0.44721) is less than tol_rel.
$ ./gmres_convergence_test
=== inner criterion terminates conv_cond=0 ===
conv_cond=0 tol=0.9 restart=2 ||b||=1.41421
[MESSAGE] it 0: norm of residual 1.4142135623730951e+00 Norm of rhs: 1.4142135623730951e+00
[MESSAGE] it: 1 --> norm of the residual 4.4721359549995804e-01
[MESSAGE] End of cycle, ESTIMATED norm of residual 4.4721359549995804e-01
[MESSAGE] End of cycle, COMPUTED norm of residual 4.4721359549995793e-01
Re::Solve version
develop: 6038206
System and environment details
- Operating system: Ubuntu 24.04.4
- Compiler: GCC 13.3.0
- Backend: CPU
- Build configuration:
- CUDA: enabled (CUDA 12.9), not used for this
- KLU: enabled
Additional information
No response
Description how to reproduce the bug
The current GMRES implementation uses inconsistent convergence criteria in the outer and inner loops. The outer loop uses the criterion
conv_condwhile the inner loop always usestol * ||r_0||.Run a simple test using
LinSolverIterativeFGMRESon the CPU with an identity right preconditioner and the following parameters:conv_cond = 0tol = 0.9restart = 2maxit = 10With
conv_cond = 0convergence should require the residual norm to be no greater than machine epsilon but the inner loop usestol_rel = tol * ||r_0|| ≈ 1.27279.The inner loop terminates after one iteration because the estimated residual (
~0.44721) is less thantol_rel.Re::Solve version
develop: 6038206
System and environment details
Additional information
No response