Add SuperLUDIST sparse factorization support#1046
Merged
Merged
Conversation
Contributor
Author
Member
|
Can you join a Friday meeting to chat? |
Contributor
Author
|
Sure, what time is it? |
ChrisRackauckas-Claude
pushed a commit
to ChrisRackauckas-Claude/LinearSolve.jl
that referenced
this pull request
Jun 21, 2026
The resolve test iterates over all subtypes of AbstractSparseFactorization and calls `alg()` on each that is not explicitly skipped. SuperLUDIST support (SciML#1046) added SuperLUDISTFactorization as a subtype, but its constructor errors unless the LinearSolveSuperLUDISTExt extension is loaded (which requires `using MPI, SuperLUDIST, SparseArrays` and an initialized MPI process grid). The Core resolve test never loads those, so construction errored and broke the Core and Downgrade test groups across all Julia versions. SuperLUDIST has its own dedicated test group (test/LinearSolveSuperLUDIST), so skip it in the generic resolve loop like the other extension/hardware-gated factorizations. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ChrisRackauckas
added a commit
that referenced
this pull request
Jun 22, 2026
…cacheval regression (#1053) * Skip SuperLUDISTFactorization in Core resolve test The resolve test iterates over all subtypes of AbstractSparseFactorization and calls `alg()` on each that is not explicitly skipped. SuperLUDIST support (#1046) added SuperLUDISTFactorization as a subtype, but its constructor errors unless the LinearSolveSuperLUDISTExt extension is loaded (which requires `using MPI, SuperLUDIST, SparseArrays` and an initialized MPI process grid). The Core resolve test never loads those, so construction errored and broke the Core and Downgrade test groups across all Julia versions. SuperLUDIST has its own dedicated test group (test/LinearSolveSuperLUDIST), so skip it in the generic resolve loop like the other extension/hardware-gated factorizations. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Fix StaticArrays.LU `.factors` access in GenericLU/RFLU init_cacheval PR #1038 changed the `GenericLUFactorization` and `RFLUFactorization` `init_cacheval` to rebuild the cached factorization instance via `LinearAlgebra.LU(luinst.factors, ipiv, luinst.info)` so the cacheval slot type would match the `Vector{BlasInt}` pivot used by `solve!` for non-`Array` dense containers (e.g. `FixedSizeArray`). That rebuild assumes `ArrayInterface.lu_instance(A)` returns a `LinearAlgebra.LU`. For static arrays (e.g. `SizedMatrix`) it returns a `StaticArrays.LU`, whose fields are `L`, `U`, `p` — there is no `factors` or `info` field, so the access threw `type StaticArrays.LU has no field factors`. This broke the OrdinaryDiffEq downstream "Sized Matrix Tests" (Rodas4 over a `SizedMatrix` state routes through the default solver -> RFLU init_cacheval). Fix: keep the rebuild when `lu_instance` returns a `LinearAlgebra.LU`; otherwise build the matching `LinearAlgebra.LU` directly from the converted matrix and the `Vector{BlasInt}` pivot — which is exactly what `solve!` stores for static-array inputs (`generic_lufact!` / `RecursiveFactorization.lu!` return `LU{T, typeof(A), Vector{BlasInt}}`). Verified locally on Julia 1.12 + StaticArrays 1.9.18: `GenericLUFactorization` and the default-solver (RFLU) paths now solve a `SizedMatrix` LinearProblem; the Core `fixedsizearrays` (47/47) and `resolve` (123/123) tests still pass. Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: ChrisRackauckas-Claude <accounts@chrisrackauckas.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
contributor guidelines, in particular the SciML Style Guide and
COLPRAC.
Additional Context
SuperLUDISTFactorizationsparse direct solver wrapper and a dedicatedLinearSolveSuperLUDISTtest group.Float32/Float64) inputs.ComplexF64is rejected for now because the current upstreamSuperLUDIST.jlreplicated complex solve path crashes during finalization.fixes #49
AI Disclosure: Used GPT 5.4