Skip to content

Move the SupernodalLU sweep proof to a QA-only file - #1121

Merged
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:snlu-alloccheck-split
Jul 27, 2026
Merged

Move the SupernodalLU sweep proof to a QA-only file#1121
ChrisRackauckas merged 1 commit into
SciML:mainfrom
ChrisRackauckas-Claude:snlu-alloccheck-split

Conversation

@ChrisRackauckas-Claude

Copy link
Copy Markdown
Member

Please ignore until reviewed by @ChrisRackauckas.

Follow-up to #1119, which merged while this was in progress — rebased onto main. Addresses the structural half of the macOS failure: the pre job specifically.

The problem

test/runtests.jl includes qa/allocations.jl from two groups that do not cover the same Julia versions:

[QA]              versions = ["lts", "1"]
[AppleAccelerate] versions = ["lts", "1", "pre"]

So AllocCheck ran on pre through a group that was never meant to carry it.

The split

The file mixes two things with different portability:

  • Direct-BLAS refactorization proofs — hold on every release. That contract is the reason the AppleAccelerate group exists. Stay put, still run under both groups on all versions.
  • The SupernodalLU sweep proof — above PANEL_BLAS_CUTOFF the sweeps hand off to LinearAlgebra's ldiv!/mul!, whose wrappers leave a generic_trimatdiv! dynamic dispatch plus boxed MulAddMul/SubArray values that AllocCheck reports on 1.10 and 1.13. Moves to test/qa/supernodal_allocations.jl, included only by QA.

Measured on the same two matrices the testset uses:

Julia arch static findings runtime 1-RHS 3-RHS
1.10.11 x86_64-Linux 18 0 B 0 B
1.12.6 x86_64-Linux 0 0 B 0 B

18 findings on 1.10 x86_64-Linux is the same count #1119 measured on 1.10 aarch64-Darwin, and 1.12 is clean on both — so this is the stdlib and the Julia version, not the platform and not this package's code. (That also closes the "I have no Linux box here" caveat in #1119.)

Worth flagging: the coverage is narrower than the toml suggests — only one QA job actually materialises (QA (julia 1)), so the static proof is exercised on 1.12 alone, and it was green on Linux only because QA/lts never runs.

One deliberate difference from #1119

The static proof keeps a version guard — that is a genuine limit of the prover, and the runtime numbers above show the sweeps are allocation-free anyway.

RUNTIME_MULTIRHS_ZERO is dropped. It gated a runtime allocation assertion, and per #1119's own table the 1.11 multi-RHS path allocates 6144 B for real — that is a regression, not a prover limitation, and skipping the assertion hides it. With the gate gone the test fails on 1.11 until the allocation is fixed, which I think is the correct behavior. 1.11 is not in the CI matrix (lts/1/pre = 1.10/1.12/1.13), so this costs nothing today. I could not reproduce the 6144 B myself — my 1.11 QA env failed to precompile AllocCheck — so I have not verified that number independently.

Testing

  • qa/allocations.jl completes on Julia 1.10, the version that was failing.
  • GROUP=QA on Julia 1.12 (what CI runs): rc=0.
  • GROUP=Core on Julia 1.12: rc=0.
  • Runic reports no formatting changes.

🤖 Generated with Claude Code

https://claude.ai/code/session_017rr42T1vFRRT8D7DMAmJzf

`test/runtests.jl` includes `qa/allocations.jl` from two groups, and they do not
cover the same Julia versions:

    [QA]              versions = ["lts", "1"]
    [AppleAccelerate] versions = ["lts", "1", "pre"]

So AllocCheck ran on `pre` through a group that was never meant to carry it.

The file mixes two things with different portability. The direct-BLAS
refactorization proofs hold on every release - that contract is why the
AppleAccelerate group exists. The SupernodalLU sweep proof does not: above
`PANEL_BLAS_CUTOFF` the sweeps hand off to LinearAlgebra's `ldiv!`/`mul!`,
whose wrappers leave a `generic_trimatdiv!` dynamic dispatch plus boxed
`MulAddMul`/`SubArray` values that AllocCheck reports on 1.10 and 1.13. Only
the second one belongs behind QA's version set, so only it moves.

Measured, same two matrices as the testset:

    Julia 1.10.11  x86_64-Linux   18 static findings   runtime 0 B / 0 B
    Julia 1.12.6   x86_64-Linux    0 static findings   runtime 0 B / 0 B

18 findings on 1.10 x86_64-Linux is the same count SciML#1119 measured on 1.10
aarch64-Darwin, and 1.12 is clean on both, so this is the stdlib and the Julia
version - not the platform, and not this package's code. Worth noting the
coverage is narrower than the toml suggests: only one QA job materialises
(`QA (julia 1)`), so the static proof runs on 1.12 alone.

The static proof keeps a version guard, since that is a limit of the prover.
`RUNTIME_MULTIRHS_ZERO` is dropped: it gated a *runtime* allocation assertion,
and on 1.11 that assertion fails because the multi-RHS path really does
allocate (6144 B, per SciML#1119's table). Skipping it hides a regression rather
than a prover limitation, so it should fail there until the allocation is
fixed.

Verified: `qa/allocations.jl` completes on Julia 1.10, the version that was
failing; `GROUP=QA` and `GROUP=Core` both pass on 1.12, which is what CI runs.

Stacked on SciML#1119 - it carries the `_lu_from_cacheval` fix this needs.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017rr42T1vFRRT8D7DMAmJzf
@ChrisRackauckas
ChrisRackauckas marked this pull request as ready for review July 27, 2026 10:38
@ChrisRackauckas
ChrisRackauckas merged commit 2fcfb43 into SciML:main Jul 27, 2026
57 of 62 checks passed
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