Skip to content

Pass correct off-diagonal length to SymTridiagonal in expT! call - #277

Open
KristofferC wants to merge 1 commit into
SciML:masterfrom
KristofferC:kc/symtridiagonal-ev-length
Open

Pass correct off-diagonal length to SymTridiagonal in expT! call#277
KristofferC wants to merge 1 commit into
SciML:masterfrom
KristofferC:kc/symtridiagonal-ev-length

Conversation

@KristofferC

@KristofferC KristofferC commented Aug 31, 2026

Copy link
Copy Markdown

The Lanczos loop in the error-estimate variant of expv! passes @view(β[1:j]) to expT!, one element more than the j×j tridiagonal needs — β[j] is the residual norm, not part of T_j. SymTridiagonal used to ignore the extra element (LAPACK convention), but on Julia 1.14 it throws DimensionMismatch (JuliaLang/LinearAlgebra.jl#1569), which currently breaks dependents in PkgEval at precompile time, e.g. FirstPassageTools and MRFingerprintingRecon.

Passing β[1:j-1] is accepted on all Julia versions (no compat bound changes needed, safe to backport), and expT! only uses β through the SymTridiagonal, so behavior on ≤1.13 is unchanged.

🤖 Generated with Claude Code

The j×j Lanczos tridiagonal needs only β[1:j-1]; the extra β[j] was
tolerated and ignored by SymTridiagonal, but Julia 1.14 throws a
DimensionMismatch (JuliaLang/LinearAlgebra.jl#1569). The shorter form is
accepted on all Julia versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@KristofferC
KristofferC force-pushed the kc/symtridiagonal-ev-length branch from 3adcd7b to b21f223 Compare August 31, 2026 12:36
@KristofferC KristofferC changed the title Fix Lanczos error-estimate path in expT! Pass correct off-diagonal length to SymTridiagonal in expT! call Aug 31, 2026
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