Bug: GMRES uses inconsistent convergence criteria in the outer and inner loops
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 58/100
Research direction
Start at the LinSolverIterativeFGMRES implementation and reproduce the issue with the gmres_convergence_test parameters described in the report. Trace how conv_cond and tol_rel are used in the outer and inner loops; done means both loops apply the intended convergence criterion and the test no longer terminates early when conv_cond=0.
Written by the indexing model from the issue text.
Description
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 implemented only for this test and the following parameters:
conv_cond = 0tol = 0.9restart = 2maxit = 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
- Dominant language
- C++
- Stars
- 85
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ORNL/ReSolve
-
SystemSolver still uses string to select configuration optionsMay be free again A pull request for this issue was closed without being merged. Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Support unpreconditioned GMRESMay be free again @kakeueda claimed this 46 days ago, and no pull request is open. Openenhancement iterative solver
Difficulty 3/5 1-2 days Newbie friendliness 55/100
-
Support P and Q permutations provided by the user in `LinSolverDirectKLU`May be free again @stark256-spec claimed this 39 days ago, and no pull request is open. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
enhancement question
Difficulty 3/5 1-2 days Newbie friendliness 48/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
useless statementOpen
Difficulty 1/5 Under an hour Newbie friendliness 86/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
grizzlypeak3d/DJV#962 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day