Skip to content

Add DSTEBR/SSTEBR: values-only boundary-row DC eigensolvers - #1424

Open
Ruinique wants to merge 3 commits into
Reference-LAPACK:masterfrom
Ruinique:stebr-pr
Open

Ruinique wants to merge 3 commits into
Reference-LAPACK:masterfrom
Ruinique:stebr-pr

Conversation

@Ruinique

@Ruinique Ruinique commented Sep 20, 2026 •

Copy link
Copy Markdown

Description

This adds two new routines, DSTEBR and SSTEBR, that compute all
eigenvalues of a real symmetric tridiagonal matrix with a values-only
divide-and-conquer method.

Only the first and last boundary rows of each local eigenvector block are
propagated across merge levels, instead of storing complete secular
eigenvector blocks for *LAEDA-style replay. The workspace is therefore
O(N):

  • LWORK >= 16*N, LIWORK >= 7*N for N > SMLSIZ
  • blocks with N <= SMLSIZ fall back to *STERF

STEBR = Symmetric Tridiagonal Eigenvalues, Boundary-Row DC.

New files

  • SRC/dstebr.f, SRC/sstebr.f — public drivers
  • SRC/dlaed0_br.f / SRC/slaed0_br.f
  • SRC/dlaed4_br.f / SRC/slaed4_br.f
  • SRC/dlaed7_br.f / SRC/slaed7_br.f (contains *LAED8_BR)
  • SRC/dlaed9_br.f / SRC/slaed9_br.f
  • LAPACKE/src/lapacke_dstebr.c, lapacke_sstebr.c and their _work variants

Updated files

  • SRC/Makefile, SRC/CMakeLists.txt (SCLAUX, DZLAUX)
  • TESTING/EIG/dchkst.f, TESTING/EIG/schkst.f: new test (38),
    | D1 - D5 | / ( |D1| ulp ) with D1 from *STEQR('V'), same style as
    tests (12) and (26)
  • LAPACKE/include/lapack.h, LAPACKE/include/lapacke.h,
    LAPACKE/include/lapacke_64.h, LAPACKE/src/Makefile,
    LAPACKE/src/CMakeLists.txt
  • DOCS/groups-usr.dox: new stebr group

Testing

Built with gfortran using make.inc.example, run with the standard
TESTING drivers and summarized with lapack_testing.py:

  • REAL: 1,633,200 tests, 0 failures
  • DOUBLE PRECISION: 1,633,992 tests, 0 failures
  • dsep.out / ssep.out now report 4560 DST/SST tests per NB setting
    (4440 before test (38)), all passing

Test (38) only enters the new code for N > SMLSIZ. TESTING/sep.in tops
out at N = 20, so there it exercises the *STERF fallback; with an
enlarged input (N = 64, 128) test (38) does exercise *LAED0_BR, and
fails as expected when DSTEBR is deliberately perturbed.

The new sources compile clean with the CI flag sets
(-Werror=conversion, -fimplicit-none, -fcheck=all, -pedantic), the
C wrappers with -Wall -pedantic-errors, and the routines pass
-fcheck=all at run time. The only remaining warning is
-Wmaybe-uninitialized on JLAM, which SRC/dlaed8.f produces as well.

Compatibility

No existing public interface changes, and no change to *STEDC or *STERF
behavior.

Checklist

  • The documentation has been updated.
  • If the PR solves a specific issue, it is set to be closed on merge.

@Ruinique
Ruinique force-pushed the stebr-pr branch 2 times, most recently from 1bd43e5 to 15d215d Compare September 20, 2026 11:48
DSTEBR and SSTEBR compute all eigenvalues of a real symmetric
tridiagonal matrix with a values-only divide-and-conquer method.
Only the first and last boundary rows of each local eigenvector
block are propagated across merge levels, so no *LAEDA-style
full-block store/replay is needed.

The workspace is O(N): LWORK >= 16*N and LIWORK >= 7*N for
N > SMLSIZ; blocks with N <= SMLSIZ fall back to *STERF.  DSTEBR
and SSTEBR are new routines and do not change the behavior of
*STEDC or *STERF.

Private helpers: *LAED0_BR, *LAED4_BR, *LAED7_BR/*LAED8_BR and
*LAED9_BR.

DCHKST and SCHKST gain test (38):
| D1 - D5 | / ( |D1| ulp ), with D1 from *STEQR('V').

LAPACKE gains LAPACKE_dstebr, LAPACKE_sstebr and their _work
variants (workspace query, LP64 and ILP64).
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 6.51085% with 1120 lines in your changes missing coverage. Please review.
✅ Project coverage is 69.18%. Comparing base (8835bfa) to head (ec595ea).
⚠️ Report is 2 commits behind head on master.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
SRC/dlaed7_br.f 0.00% 193 Missing ⚠️
SRC/slaed7_br.f 0.00% 193 Missing ⚠️
SRC/dlaed9_br.f 0.00% 146 Missing ⚠️
SRC/slaed9_br.f 0.00% 146 Missing ⚠️
SRC/dlaed0_br.f 0.00% 96 Missing ⚠️
SRC/slaed0_br.f 0.00% 96 Missing ⚠️
SRC/dlaed4_br.f 0.00% 41 Missing ⚠️
SRC/slaed4_br.f 0.00% 41 Missing ⚠️
SRC/dstebr.f 38.46% 40 Missing ⚠️
SRC/sstebr.f 38.46% 40 Missing ⚠️
... and 6 more
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1424      +/-   ##
==========================================
- Coverage   69.33%   69.18%   -0.16%     
==========================================
  Files        6122     6136      +14     
  Lines      487027   488227    +1200     
  Branches    23268    23282      +14     
==========================================
+ Hits       337686   337766      +80     
- Misses     148903   150023    +1120     
  Partials      438      438              
Components Coverage Δ
BLAS 97.94% <ø> (ø)
CBLAS 96.98% <ø> (ø)
LAPACK 81.86% <4.62%> (-0.44%) ⬇️
LAPACKE 2.17% <0.00%> (-0.01%) ⬇️
TMGLIB 55.69% <ø> (ø)
BLAS testing 88.33% <ø> (ø)
CBLAS testing 89.63% <ø> (ø)
LAPACK testing 82.20% <63.63%> (-0.01%) ⬇️
LAPACKE testing ∅ <ø> (∅)
Files with missing lines Coverage Δ
LAPACKE/src/lapacke_dstebr_work.c 0.00% <0.00%> (ø)
LAPACKE/src/lapacke_sstebr_work.c 0.00% <0.00%> (ø)
TESTING/EIG/dchkst.f 63.17% <63.63%> (+0.01%) ⬆️
TESTING/EIG/schkst.f 63.17% <63.63%> (+0.01%) ⬆️
LAPACKE/src/lapacke_dstebr.c 0.00% <0.00%> (ø)
LAPACKE/src/lapacke_sstebr.c 0.00% <0.00%> (ø)
SRC/dstebr.f 38.46% <38.46%> (ø)
SRC/sstebr.f 38.46% <38.46%> (ø)
SRC/dlaed4_br.f 0.00% <0.00%> (ø)
SRC/slaed4_br.f 0.00% <0.00%> (ø)
... and 6 more

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8835bfa...ec595ea. Read the comment docs.

langou
langou previously approved these changes Sep 26, 2026
Fixes -Werror=conversion (INTEGER(8) to REAL(4)) in the
-fdefault-integer-8 builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Ruinique

Copy link
Copy Markdown
Author

Fixed the -fdefault-integer-8 conversion error in SSTEBR, could you approve the workflow run?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants