Skip to content

Release v3.86.2: ship SizedMatrix init_cacheval fix + regression test#1061

Closed
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix-genericlu-sized-matrix-release
Closed

Release v3.86.2: ship SizedMatrix init_cacheval fix + regression test#1061
ChrisRackauckas-Claude wants to merge 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:fix-genericlu-sized-matrix-release

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Contributor

Please ignore until reviewed by @ChrisRackauckas.

What this fixes

OrdinaryDiffEq.jl master CI is failing in the InterfaceIV group (sized_matrix_tests.jl), e.g. this run:

FieldError: type StaticArrays.LU has no field `factors`, available fields: `L`, `U`, `p`
  @ LinearSolve src/factorization.jl  (init_cacheval, GenericLUFactorization)

Root cause

PR #1038 changed init_cacheval(::GenericLUFactorization) and init_cacheval(::RFLUFactorization) to rebuild the cacheval via LinearAlgebra.LU(luinst.factors, ipiv, luinst.info) so the pivot slot type matches for non-Array dense containers (e.g. FixedSizeArray). But ArrayInterface.lu_instance returns a StaticArrays.LU (fields L/U/p, no factors/info) for a SizedMatrix, so the rebuild threw. Rodas4 over a SizedMatrix state routes through the default solver, which initializes the GenericLU/RFLU cachevals — hence the downstream failure.

Why it's still broken downstream

The code fix already landed on main (#1056, #1053: guard the rebuild with luinst isa LinearAlgebra.LU || return luinst, ipiv). The problem is purely a release one: Project.toml still read version = "3.86.1", identical to the latest registered release, so no new version was ever cut. OrdinaryDiffEq CI keeps resolving the buggy registered v3.86.1.

Changes

  • Bump 3.86.13.86.2 so the already-merged fix actually ships.
  • Add test/Core/sized_matrix.jl (and register it in runtests.jl) covering the init_cacheval path that threw: init of a LinearProblem{SizedMatrix} with the default solver and with explicit GenericLUFactorization/RFLUFactorization. There was no regression test for this in LinearSolve's own suite — only the downstream OrdinaryDiffEq test caught it.

Verification (run locally, Julia 1.12)

  • Reproduced the exact CI FieldError with registered v3.86.1 via the OrdinaryDiffEq sized_matrix_tests problem (Rodas4 over a SizedMatrix).
  • The same problem returns retcode=Success with main dev'd in.
  • New test/Core/sized_matrix.jl errors on v3.86.1 with the exact type StaticArrays.LU has no field factors and passes on main.
  • Ran Runic on the new test file.

🤖 Generated with Claude Code

The `init_cacheval(::GenericLUFactorization/::RFLUFactorization)` regression
for `SizedMatrix` (StaticArrays.LU has no `factors`/`info` field) was fixed in
SciML#1056/SciML#1053 but never released: `Project.toml` still read `3.86.1`, identical to
the registered release, so OrdinaryDiffEq CI kept installing the buggy v3.86.1
and the "Sized Matrix Tests" (Rodas4 over a `SizedMatrix` state) errored with
`type StaticArrays.LU has no field factors`.

Bump to 3.86.2 so the fix ships, and add test/Core/sized_matrix.jl covering the
`init_cacheval` path that threw: `init` of a `LinearProblem{SizedMatrix}` with
the default solver and with explicit `GenericLUFactorization`/`RFLUFactorization`.
The test errors on v3.86.1 with the exact `FieldError` and passes on main.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
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