Repository navigation
Description
Summary
dsep/dse2 still fail one test each at the current 60.0 threshold
(raised in #1346):
Matrix order= 20, type=10, seed=2649, 522,3368,1089, result 83 is 75.32
DST drivers: 1 out of 13464 tests failed to pass the threshold
The value is legitimate: it is the documented orthogonality limitation of
inverse iteration (xSTEIN), not a defect in the routines or in the build.
But the deeper finding is that no fixed threshold bounds this test: a
Monte-Carlo sweep over the same matrix family produces ratios of 2379 at
n = 10 and 13765 at n = 40. The current failure is one draw from a heavy
tail, and the merged IL/IU fix (#1347) demonstrates just how seed-dependent
the observed maximum is (details below).
Observed on master @ fad42f8ec (v3.12.1 base), gfortran 16.1.0 -O3,
reference BLAS, Linux x86-64. Bit-identical under gfortran 9.3 / 13.2 /
15.2 / 16.1 at -O0 through -O3, with and without -ffp-contract=off,
so this is not an environment or optimization artifact. (It happens to
vanish under -march=native — the case sits on a rounding knife-edge,
which is exactly the character of the problem.)
What fails, precisely
Test 83 is DDRVST test 29+54: the eigenvector-orthogonality half
(DSYT21 RESULT(2), |I - U U^T| / (n ulp)) of the DSYEVX('V','A','U')
check. Before #1347 the same matrix also failed tests 86/89/128/131 — the
orthogonality halves of the DSYEVX('V','I'), DSYEVX('V','V'),
DSYEVR('V','I') and DSYEVR('V','V') checks (DSYT22 RESULT(2)), at
377.21 and 381.68.
In every case only the orthogonality component fails. The residual
partners (tests 82/85/88/127/130, |A U - U S|-type checks) all stay below
5.0. The computed invariant subspace is fine; the individual vectors inside
a numerically degenerate cluster are not mutually orthogonal to O(ulp).
Why a fixed threshold cannot cover it
Monte-Carlo over the identical family (DLATMS 'S'/MODE=1/COND=1/ulp,
400 matrices per size, the suite's five NB/NX configurations,
DSYEVX('V','A') plus every IL:IU subset via DSYEVX('V','I')):
| n | tests | max |I-UU^T|/(n ulp) (RANGE='A') |
max DORT01 (RANGE='I') | #>60 | #>500 |
|---|---|---|---|---|---|
| 5 | 32 000 | 37.5 | 33.7 | 0 | 0 |
| 10 | 112 000 | 804.8 | 2379.5 | 51 | 19 |
| 20 | 422 000 | 83.6 | 745.2 | 87 | 6 |
| 40 | 1 642 000 | 61.7 | 13 764.9 | 618 | 37 |
The tail scales with the cluster's effective condition, not with any fixed
multiple of ulp. Any threshold is a bet on the seeds.
How #1347 changed the picture (evidence of seed sensitivity)
The IL/IU fix is relevant here in both directions:
- Before TESTING: fix random IL/IU selection in the symmetric eigenvalue testers #1347,
IL = 1 + (N-1)*INT(xLARND(1,ISEED2))collapsed to
IL = IU = 1, soDDRVST'sRANGE='I'/'V'tests had never exercised
more than one eigenvector — the 377/382 values above were invisible in
dsep(thoughdse2reached them through a different seed stream). - Commit 1 of TESTING: fix random IL/IU selection in the symmetric eigenvalue testers #1347 (
cdb89685b) made the draws real:dsepanddse2
both reported five failures at 60.0 (75.32 / 377.21 / 381.68 ×2). - Commit 2 (
f955756bf, range[1,N]) shifted the draw sequence again and
the pathologicalIL=2,IU=19subset for this particular matrix is no
longer selected: both suites are back to the single 75.32 failure.
Same binaries, same routines — the reported maximum moved
75 → 382 → 75 purely on the index lottery. For the same reason zsep's
suite maximum moved 17.50 → 27.50 across #1347. The current "1 failure"
state is luck, not health.
Full sweep of suite maxima on current master (threshold column is what
sep.in/se2.in ship):
| suite | max ratio | threshold |
|---|---|---|
| ssep / sse2 | 16.25 / 15.18 | 60 |
| dsep / dse2 | 75.32 / 75.32 | 60 |
| csep / cse2 | 17.67 / 17.67 | 60 |
| zsep / zse2 | 27.50 / 26.25 | 60 |
Only double precision crosses 60 with the shipped seeds; 400.0 and 500.0
were both verified to give zero failures across all four precisions.
Related
- TESTING: raise SEP threshold to account for xSTEIN's orthogonality guarantee #1346 set the current 60.0 with the comment
(theoretical limit ~500, empirically reached limit ~170, increase if necessary)— the shipped seeds already exceed 170; the MC tail exceeds
500 at every size ≥ 10. - Revert "*evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I…" #1324 reverted the *evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I… #1295 STEMR fast path, which is why
DSYEVR('V','I'/'V')now reachesDSTEINat all (tests 128/131 above).
With *evr, *stevr: use fast CSTEMR path for partial eigenvalue ranges on I… #1295 in place, noIL:IUsubset of the failing matrix exceeds 60 —
but that only shieldsxSYEVR/xSTEVR, notxSYEVX/xSPEVX/xSBEVX/
xSTEVX, so it is not a fix for this issue either.
Options
- Raise
sep.in/se2.into 500.0 (or 400.0). Covers the shipped
seeds with margin and matches the~500theoretical note from TESTING: raise SEP threshold to account for xSTEIN's orthogonality guarantee #1346.
Cheap, but remains a bet — the MC tail crosses 500 even at n=10, so a
future seed/ordering change (as TESTING: fix random IL/IU selection in the symmetric eigenvalue testers #1347 just demonstrated) can break it
again. - Scale or gate the orthogonality checks by the cluster structure.
DSYT21/DSYT22RESULT(2)currently assume O(ulp) orthogonality,
which inverse iteration does not promise for clusters with sub-ulp
relative gaps. The check could divide by aulp·||T||/gap-style bound,
or the drivers could skip/loosenRESULT(2)for matrix types whose
construction guarantees such clusters (precedent:1aaf19768dropped
SVD type 9 for the same class of reason). - Strengthen
xSTEIN: iterate the Gram-Schmidt pass ("twice is
enough") until the overlap against the group is O(ulp), instead of one
pass per inverse-iteration step. Fixes the root cause for every caller
(xSYEVX,xSPEVX,xSBEVX,xSTEVX,xSYEVRfallback), at the cost
of a behavioural change in a long-stable computational routine.
Option 1 is the pragmatic short-term move; options 2/3 are what would make
the suite deterministic in principle. Happy to prepare a PR for whichever
direction is preferred.
Activity