Skip to content

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

Closed
Ruinique wants to merge 1 commit into
OpenMathLib:developfrom
Ruinique:stebr
Closed

Ruinique wants to merge 1 commit into
OpenMathLib:developfrom
Ruinique:stebr

Conversation

@Ruinique

Copy link
Copy Markdown

Description

Adds two new public routines, DSTEBR and SSTEBR, that compute all
eigenvalues of a real symmetric tridiagonal matrix with a values-only
divide-and-conquer method. This is a port of the routines accepted in
Reference-LAPACK PR #1424.

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 >= MAX(16*N, 2*N + SMLSIZ**2 + 2*SMLSIZ - 2), LIWORK >= 7*N for N > SMLSIZ
  • blocks with N <= SMLSIZ fall back to *STERF

DSTEBR/SSTEBR are new routines and do not change the behavior of *STEDC
or *STERF.

New files

  • lapack-netlib/SRC/dstebr.f, sstebr.f
  • lapack-netlib/SRC/dlaed0_br.f / slaed0_br.f (also define *LAED0_MERGE_PAIR, *STEQR_BOUNDARY_BR)
  • lapack-netlib/SRC/dlaed4_br.f / slaed4_br.f
  • lapack-netlib/SRC/dlaed7_br.f / slaed7_br.f (also define *LAED8_BR)
  • lapack-netlib/SRC/dlaed9_br.f / slaed9_br.f
  • lapack-netlib/LAPACKE/src/lapacke_dstebr.c, lapacke_dstebr_work.c, lapacke_sstebr.c, lapacke_sstebr_work.c

Updated files

  • lapack-netlib/SRC/Makefile, lapack-netlib/SRC/CMakeLists.txt, cmake/lapack.cmake
  • lapack-netlib/TESTING/EIG/dchkst.f, schkst.f: test (38),
    | D1 - D5 | / ( |D1| ulp ) with D1 from *STEQR('V'), varying SMLSIZ
    over 2, 8, 25 so merges run even with the small sizes in sep.in
  • lapack-netlib/LAPACKE/include/lapack.h, lapacke.h, LAPACKE/src/Makefile, LAPACKE/src/CMakeLists.txt
  • exports/gensymbol: export dstebr/sstebr and the LAPACKE wrappers

Testing

  • Double-precision sweep (645 cases, N up to 128) against DSTERF and
    DSTEDC('N'): 0 failures.
  • Single-precision probe against SSTERF: max difference 1.8e-6.
  • LAPACKE_dstebr / LAPACKE_sstebr called from C: values match.
  • Sources compile with -fimplicit-none -fcheck=all and with
    -fdefault-integer-8 -Werror=conversion.

Compatibility

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

Port of Reference-LAPACK PR OpenMathLib#1424.  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 >= MAX(16*N, 2*N + SMLSIZ**2 + 2*SMLSIZ - 2)
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.

New public routines: DSTEBR, SSTEBR.
Private helpers: *LAED0_BR, *LAED4_BR, *LAED7_BR/*LAED8_BR, *LAED9_BR.
LAPACKE gains LAPACKE_dstebr, LAPACKE_sstebr and their _work variants.
DCHKST and SCHKST gain test (38), varying SMLSIZ to exercise merges.
@Ruinique Ruinique closed this Oct 17, 2026
@Ruinique
Ruinique deleted the stebr branch October 17, 2026 05:09
@martin-frbg

Copy link
Copy Markdown
Collaborator

Thanks - adding new LAPACK routines here entails producing C versions of them for the Androids and Fortran haters that walk among us. I plan to import the latest LAPACK changes soon

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