-
-
Notifications
You must be signed in to change notification settings - Fork 71
Add OpenBLASLUFactorization implementation #745
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
ChrisRackauckas
merged 8 commits into
SciML:main
from
ChrisRackauckas-Claude:add-openblas-lu-factorization
Aug 20, 2025
Merged
Add OpenBLASLUFactorization implementation #745
ChrisRackauckas
merged 8 commits into
SciML:main
from
ChrisRackauckas-Claude:add-openblas-lu-factorization
Aug 20, 2025
Conversation
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
- Implement OpenBLASLUFactorization as a direct wrapper over OpenBLAS_jll - Add getrf! and getrs! functions for LU factorization and solving - Support Float32, Float64, ComplexF32, and ComplexF64 types - Include proper module structure and exports - Add OpenBLAS_jll as a dependency - Tests confirm functionality matches existing LUFactorization
- Add OpenBLASLUFactorization to basictests.jl alongside other factorizations - Include in resolve.jl subtype iteration tests - Add to preferences.jl algorithm availability tests - Remove separate test file in favor of integrated testing
- Add detailed docstring with performance characteristics and usage examples - Include OpenBLASLUFactorization in solver documentation alongside MKL and AppleAccelerate - Update algorithm selection guide to mention OpenBLAS as an option for large dense matrices - Document when to use OpenBLAS vs other BLAS implementations
- Remove redundant import of LinearAlgebra items that are already available via using LinearAlgebra - Qualify all uses of BlasInt, LU, require_one_based_indexing, and checksquare with LinearAlgebra prefix - Add OpenBLAS_jll = "0.3" to compat section in Project.toml - Apply JuliaFormatter with SciMLStyle to ensure consistent formatting
- Remove separate module structure, follow MKL's pattern exactly - Conditionally check for OpenBLAS_jll availability using is_available() - Keep OpenBLAS_jll as a dependency (required even for stdlib packages) - Simplify implementation without nested @static checks - Tests conditionally run based on LinearSolve.useopenblas flag
- Added LoadOpenBLAS_JLL preference with default value true - Users can now disable OpenBLAS via preferences - Matches the existing MKL preference pattern
Latest UpdatesAdded preference system for OpenBLAS loading as requested:
if Preferences.@load_preference("LoadOpenBLAS_JLL", true)
using OpenBLAS_jll: OpenBLAS_jll
const useopenblas = OpenBLAS_jll.is_available()
else
const useopenblas = false
end This allows users to disable OpenBLAS if they prefer to use their system BLAS or another implementation. The implementation is now feature-complete and matches the MKL implementation pattern in all aspects:
🤖 Generated with Claude Code |
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.
Summary
OpenBLASLUFactorization
as a new solver that directly calls OpenBLAS_jllImplementation Details
This PR introduces
OpenBLASLUFactorization
, which mirrors the existingMKLLUFactorization
but uses OpenBLAS_jll directly instead of MKL. Key features:Testing
The implementation has been tested locally with all supported types and produces identical results to the standard LUFactorization:
Use Case
This solver is particularly useful for:
🤖 Generated with Claude Code