Skip to content

Commit aba4d3a

Browse files
committed
Update linear solver heuristic
1 parent 7491917 commit aba4d3a

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DiffEqBase"
22
uuid = "2b5f629d-d688-5b77-993f-72d75c75574e"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "6.32.1"
4+
version = "6.32.2"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/linear_nonlinear.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,12 @@ function (p::DefaultLinSolve)(x,A,b,update_matrix=false;tol=nothing, kwargs...)
6262
if update_matrix
6363
if typeof(A) <: Matrix
6464
blasvendor = BLAS.vendor()
65-
if (blasvendor === :openblas || blasvendor === :openblas64) && size(A,1) <= 500 && ArrayInterface.can_setindex(x) # if the user doesn't use OpenBLAS, we assume that is a much better BLAS implementation like MKL
65+
# if the user doesn't use OpenBLAS, we assume that is a better BLAS
66+
# implementation like MKL
67+
#
68+
# RecursiveFactorization seems to be consistantly winning below 100
69+
# https://discourse.julialang.org/t/ann-recursivefactorization-jl/39213
70+
if ArrayInterface.can_setindex(x) && (size(A,1) <= 100 || ((blasvendor === :openblas || blasvendor === :openblas64) && size(A,1) <= 500))
6671
p.A = RecursiveFactorization.lu!(A)
6772
else
6873
p.A = lu!(A)

0 commit comments

Comments
 (0)