Repository navigation
Conversation
Test 11 (from PR Reference-LAPACK#1410) compares the eigenvalues of xHSEQR with JOB = 'S' and JOB = 'E' by index. The two paths can return the eigenvalues in a different order, so a swap of two eigenvalues with s(j) just above sqrt(ulp) fails the test although the two lists agree. Compare each W1(j) with the nearest W3(i) instead.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1491 +/- ##
=======================================
Coverage 70.20% 70.20%
=======================================
Files 6237 6237
Lines 500437 500453 +16
Branches 23536 23536
=======================================
+ Hits 351336 351352 +16
Misses 148639 148639
Partials 462 462
Continue to review full report in Codecov by Harness.
|
This branch has not been deployed
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
Test 11 of
xCHKHS(added in #1410) compares the eigenvalues ofxHSEQRwithJOB = 'S'(W1) andJOB = 'E'(W3) index by index.xHSEQRgives the order ofWonly forJOB = 'S'(W(i) = H(i,i)); withJOB = 'E'only the active block is updated, the rounding is different, and the eigenvalues can converge in a different order. The test skips eigenvalues withs(j) < sqrt(ulp)for this reason, but swaps also occur above that limit, including for well-conditioned eigenvalues. The test then reports the distance between two different eigenvalues as an error.Two cases from OpenBLAS
make lapack-teston Apple M4 (the BLAS results are correct to rounding; only the rounding order differs from reference BLAS):Type 18 (with the new SME2 complex level-3 kernels):
s(4) = 1.683e-8is just abovesqrt(ulp) = 1.49e-8. The printed result is exactlys(4) |W1(4) - W1(5)| / (ulp max|W|);|W1(4) - W1(5)|is half ofmax|W|.Type 20 (same build, with reference ZTRMM linked in):
Here the swapped eigenvalues are well-conditioned, so a different skip limit cannot prevent the failure.
In both cases all other eigenvalues agree index by index, and with each
W1(j)paired with the nearestW3(i)the lists agree to rounding:W3(i)The nearest-
W3(i)pairing is a one-to-one exchange of the two indices in both cases.Change
In all four drivers, each
W1(j)is compared with the nearestW3(i)instead ofW3(j). Thes(j)weighting, thes(j) < sqrt(ulp)skip and the normalization are unchanged. When the eigenvalue gaps are larger than twice the tolerance, eachW3(i)can be the nearest value for only oneW1(j), so a wrong or missing value inW3still fails the test.Testing
nep.inwith reference BLAS: s, d, c and z pass (gfortran 16, CMake).make lapack-teston Apple M4 (TARGET=VORTEXM4): 1 COMPLEX16 error before, 0 errors after, in all precisions. The type 20 case above also passes.W3(2)multiplied by1 + 1e-10inzchkhs.f,nep.inreports 190 test 11 failures.