Skip to content

Add native STRUMPACK sparse solver extension #922

Open
AJ0070 wants to merge 4 commits intoSciML:mainfrom
AJ0070:fix/170
Open

Add native STRUMPACK sparse solver extension #922
AJ0070 wants to merge 4 commits intoSciML:mainfrom
AJ0070:fix/170

Conversation

@AJ0070
Copy link
Contributor

@AJ0070 AJ0070 commented Mar 22, 2026

This PR adds native STRUMPACK support to LinearSolve via a package extension.

What changed

  • Added new sparse algorithm type: STRUMPACKFactorization in src/factorization.jl
  • Exported and wired algorithm selection in src/LinearSolve.jl
  • Added extension implementation in ext/LinearSolveSTRUMPACKExt.jl:
    • runtime discovery of libstrumpack
    • sparse CSC (AbstractSparseMatrixCSC{<:AbstractFloat}) support
    • CSC → CSR conversion for STRUMPACK C API
    • factorization/solve flow with SciML retcode mapping
    • cache + finalizer-based resource cleanup
  • Registered extension in Project.toml
  • Added/updated test coverage:
    • availability behavior in test/defaults_loading.jl
    • integration via generic resolve path in test/resolve.jl
    • optional dedicated testset wiring in test/runtests.jl (kept, but not required for CI coverage)

CI behavior

Current CI already runs STRUMPACK-related coverage through existing groups (Core, DefaultsLoading).
No CI workflow update is required unless we want the dedicated LinearSolveSTRUMPACK group to run explicitly.

Checklist

  • Appropriate tests were added
  • Any code changes were done in a way that does not break public API
  • All documentation related to code changes were updated
  • The new code follows the
    contributor guidelines, in particular the SciML Style Guide and
    COLPRAC.
  • Any new documentation only uses public API

Additional context

  • STRUMPACK is loaded dynamically; if unavailable, constructor/solve paths fail with clear user-facing messages.
  • The implementation currently targets STRUMPACK MT sparse interface and Float64 solve path.

AI disclosure: used codex and gemini to help understanding current state of the code with respect to issue, adding docstring, refactoring code, adding comments and refactoring documentation, formatting PR description.

closes #170

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.

Strumpack wrapper?

1 participant