Commit 969b1e9
committed
Fix MINRES stagnation false-positive on float32: reorder convergence/stagnation checks and use 10*eps floor
- Move residual convergence check (rnorm <= atol_eff) before stagnation
check so convergence always wins when both conditions trigger on the
same iteration (fixes info=2 on float32 SPD with tol=1e-7).
- Raise stagnation floor from eps to 10*eps, matching SciPy's minres.py,
so float32 (eps~1.19e-7) does not prematurely stagnate when tol is
near machine epsilon.
- Also raise the Lanczos beta-collapse floor from eps*beta1 to
10*eps*beta1 for the same reason.
Fixes: TestMINRES.test_minres_spd_convergence[float32-5/10/20]"1 parent b70ecfd commit 969b1e9
1 file changed
Lines changed: 21 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
518 | 520 | | |
519 | 521 | | |
520 | 522 | | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
521 | 528 | | |
522 | 529 | | |
523 | 530 | | |
| |||
593 | 600 | | |
594 | 601 | | |
595 | 602 | | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
596 | 607 | | |
597 | 608 | | |
598 | 609 | | |
| |||
615 | 626 | | |
616 | 627 | | |
617 | 628 | | |
618 | | - | |
619 | | - | |
| 629 | + | |
| 630 | + | |
620 | 631 | | |
621 | 632 | | |
622 | 633 | | |
| |||
670 | 681 | | |
671 | 682 | | |
672 | 683 | | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
673 | 687 | | |
674 | 688 | | |
675 | 689 | | |
676 | 690 | | |
677 | | - | |
678 | | - | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
679 | 695 | | |
680 | 696 | | |
681 | 697 | | |
| |||
0 commit comments