Repository navigation
TESTING: Accept the documented xGEES reordering exit codes N+1 and N+2 - #1355
Merged
langou merged 1 commit intoSep 8, 2026
Merged
Conversation
{S,D}GEES and {S,D}GEESX return N+1 when the eigenvalues are too close for
xTRSEN to reorder, and N+2 when roundoff undoes the sort order afterwards.
Both are documented outcomes for a very ill conditioned matrix, but
{s,d}drves.f and {s,d}get24.f scored N+1 as a numerical failure while N+2 was
tolerated silently.
Accept both and report them with a message naming the known exit code. For
N+1 the tests that need the sorted Schur form are left unrun (RESULT = -1)
rather than set to 1/ulp; N+2 keeps testing exactly as before. This clears the
four DES/DSX failures on matrix type 17 at N=5, where DLAEXC correctly refuses
a 2x2/2x2 swap it cannot perform stably.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1355 +/- ##
===========================================
+ Coverage 0.00% 82.38% +82.38%
===========================================
Files 1937 1945 +8
Lines 190566 190130 -436
===========================================
+ Hits 0 156637 +156637
+ Misses 190566 33493 -157073 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The changes are confined to test harness logic and correctly align expected outcomes with documented xGEES/xGEESX INFO=N+1/N+2 semantics without affecting library routines.
Review details
- Files reviewed: 4/4 changed files
- Comments generated: 0 new
- Review effort level: Lite
langou
approved these changes
Sep 8, 2026
1 of 2 tasks
ilayn
added a commit
to ilayn/semicolon-lapack
that referenced
this pull request
Oct 26, 2026
…ects (#43) - Use the DLAMCH constant the Fortran asks for in 35 routines (and their s/c copies). DBL_EPSILON stood in for DLAMCH('Epsilon'), which is half of it, or the reverse. In xLAGTS this doubled the pivot tolerance, and inverse iteration in xSTEIN failed on tight clusters, so ZHEEVX/ZHPEVX returned INFO > 0 where reference LAPACK succeeds. - xGEDMD returns after XERBLA in the NaN checks of X and Y. Reference-LAPACK/lapack#1395 - ZLAGHE/CLAGHE guard a zero leading element of the reflector. Reference-LAPACK/lapack#1365 Reference-LAPACK/lapack#1366 - xTSQR01 checks the GEMLQ('R','N') residual it computes. Reference-LAPACK/lapack#1364 - xDRVES: Fortran xSLECT with SELOPT = 0, complete test 13, and the documented xGEES exit codes N+1 and N+2. Reference-LAPACK/lapack#1355 - IL/IU drawn from the full [1, N] range in the CHKST, DRVST, DRVSG, CHKBD and DRVBD drivers, and the xDRVBD GESVDX tests ported line by line. Reference-LAPACK/lapack#1347 - xDRVLS random right-hand sides and EPS, real QZ drivers SAFMIN/ULP, RFP driver parameters from the *test_rfp.in files, invented singular values removed from the xDRVBD generator, new seed for zDRVST/zDRVST2STG.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
ded.out(thexeigtstd < ded.inoutput collected bylapack_testing.py) reports four failures on macOS and on arm64 Linux:Root cause
The chain is
DGEES→DTRSEN→DTREXC→DLAEXC. InstrumentingDLAEXCshows exactly one rejected swap:DLAEXCis doing its job. The Sylvester solution has norm1.6e7, so the direct 2×2/2×2 swap cannot be performed backward-stably and the Bai–Demmel acceptance test correctly refuses it.DTRSENreportsINFO = 1, anddgees.fmaps that toINFO = N+1, documented as "the eigenvalues could not be reordered because some eigenvalues were too close to separate (the problem is very ill-conditioned)".Fix
Nothing in
SRC/needs to change. Tests 1–6 (unsorted:‖A − VS·T·VSᵀ‖, orthogonality) pass for this matrix, so the Schur decomposition is backward stable;DLAEXCcorrectly refuses an unstable swap;INFO = N+1is exactly whatdgees.fdocuments.{s,d}drves.fand{s,d}get24.falready tolerateINFO = N+2but score the equally documentedN+1as a numerical failure. Both are now accepted and reported:N+1— the tests that need the sorted Schur form are left unrun(
RESULT = -1) instead of set to1/ulp, andINFOis not set. Theaccepted branch uses the same exit statement the failure path used at that
site (
RETURNatxGEESX1,GO TO 250atxGEESX2–8,GO TO 300atxGEESX9,GO TO 220in the drivers).N+2— unchanged behaviour, it just gains a message. It was previouslytolerated with no trace in the output.
cdrves.f,zdrves.f,cget24.fandzget24.fneed no change: complex Schurforms consist only of 1×1 blocks, so
CTREXCnever rejects a swap andN+1cannot occur.