You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The tests insisting that when e.g. CGEEV is called to provide eigenvectors, it will give the exact same eigenvalues (no numerical tolerance) as when it does not provide eigenvectors.
Applying the patch to GCC, tests go down to:
--> LAPACK TESTING SUMMARY <--
Processing LAPACK Testing output found in the TESTING directory
SUMMARY nb test run numerical error other error
================ =========== ================= ================
REAL 1310427 1 (0.000%) 0 (0.000%)
DOUBLE PRECISION 1319025 0 (0.000%) 0 (0.000%)
COMPLEX 762151 254 (0.033%) 0 (0.000%)
COMPLEX16 763938 494 (0.065%) 0 (0.000%)
--> ALL PRECISIONS 4155541 749 (0.018%) 0 (0.000%)
Increasing the tolerance for 2) using
diff --git a/TESTING/ctest_rfp.in b/TESTING/ctest_rfp.in
index d6988f2a7..82e147535 100644
--- a/TESTING/ctest_rfp.in
+++ b/TESTING/ctest_rfp.in
@@ -5,5 +5,5 @@ Data file for testing COMPLEX LAPACK linear equation routines RFP format
1 2 15 Values of NRHS (number of right hand sides)
9 Number of matrix types (list types on next line if 0 < NTYPES < 9)
1 2 3 4 5 6 7 8 9 Matrix Types
-30.0 Threshold value of test ratio
+42.0 Threshold value of test ratio
T Put T to test the error exits
diff --git a/TESTING/stest_rfp.in b/TESTING/stest_rfp.in
index 08dbf83e6..9b082b7df 100644
--- a/TESTING/stest_rfp.in
+++ b/TESTING/stest_rfp.in
@@ -5,5 +5,5 @@ Data file for testing REAL LAPACK linear equation routines RFP format
1 2 15 Values of NRHS (number of right hand sides)
9 Number of matrix types (list types on next line if 0 < NTYPES < 9)
1 2 3 4 5 6 7 8 9 Matrix Types
-30.0 Threshold value of test ratio
+42.0 Threshold value of test ratio
T Put T to test the error exits
we get
--> LAPACK TESTING SUMMARY <--
Processing LAPACK Testing output found in the TESTING directory
SUMMARY nb test run numerical error other error
================ =========== ================= ================
REAL 1318203 0 (0.000%) 0 (0.000%)
DOUBLE PRECISION 1319025 0 (0.000%) 0 (0.000%)
COMPLEX 769927 253 (0.033%) 0 (0.000%)
COMPLEX16 763938 494 (0.065%) 0 (0.000%)
--> ALL PRECISIONS 4171093 747 (0.018%) 0 (0.000%)
The third one is more complex to analyze. The way I understand it is that gfortran has some freedom in how to apply FMA's to expressions such as a*b+c*d (ie. fma(a,b,c*d) or fma(c,d,a*b)) and these give slightly different results.
The loop bounds for computing and not computing eigenvectors for various loops are different, hence it is often the case that a loop with eigenvectors is vectorized, and without isn't, or for different loop iterations, and the vectorized use of FMA isn't identical to the unvectorized use of FMA. And with complex numbers of course there are even more permutations possible. Adding parentheses forces the compiler to use one variety.
Description
Tested on
master, compiling LAPACK withbrings about many test failures:
There are three categories of failures here:
CGEEVis called to provide eigenvectors, it will give the exact same eigenvalues (no numerical tolerance) as when it does not provide eigenvectors.Applying the patch to GCC, tests go down to:
Increasing the tolerance for 2) using
we get
The third one is more complex to analyze. The way I understand it is that gfortran has some freedom in how to apply FMA's to expressions such as
a*b+c*d(ie.fma(a,b,c*d)orfma(c,d,a*b)) and these give slightly different results.The loop bounds for computing and not computing eigenvectors for various loops are different, hence it is often the case that a loop with eigenvectors is vectorized, and without isn't, or for different loop iterations, and the vectorized use of FMA isn't identical to the unvectorized use of FMA. And with complex numbers of course there are even more permutations possible. Adding parentheses forces the compiler to use one variety.
Applying this patch:
makes the test failures go to 0.
But it looks quite fragile, in that it takes trial and error to see which expressions need braces.
Would it be ok instead to replace test 5, e.g.
lapack/TESTING/EIG/cdrvev.f
Lines 799 to 805 in 28f7e83
by a test that uses tolerances, like the one used below, or would that go against some specifications?
lapack/TESTING/EIG/cchkhs.f
Line 87 in 28f7e83
lapack/TESTING/EIG/cchkhs.f
Lines 825 to 835 in 28f7e83
Checklist