Skip to content

Commit aecd1af

Browse files
committed
Add preference for loading OpenBLAS, matching MKL pattern
- Added LoadOpenBLAS_JLL preference with default value true - Users can now disable OpenBLAS via preferences - Matches the existing MKL preference pattern
1 parent 1bb9e5a commit aecd1af

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/LinearSolve.jl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,13 @@ else
5959
const usemkl = false
6060
end
6161

62-
# OpenBLAS_jll is a standard library, always available
63-
using OpenBLAS_jll: OpenBLAS_jll
64-
const useopenblas = OpenBLAS_jll.is_available()
62+
# OpenBLAS_jll is a standard library, but allow users to disable it via preferences
63+
if Preferences.@load_preference("LoadOpenBLAS_JLL", true)
64+
using OpenBLAS_jll: OpenBLAS_jll
65+
const useopenblas = OpenBLAS_jll.is_available()
66+
else
67+
const useopenblas = false
68+
end
6569

6670

6771
@reexport using SciMLBase

0 commit comments

Comments
 (0)