Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/default.jl
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,29 @@ end
ex = :()
for alg in first.(EnumX.symbol_map(DefaultAlgorithmChoice.T))
if alg in Symbol.((DefaultAlgorithmChoice.LUFactorization,
DefaultAlgorithmChoice.RFLUFactorization,
DefaultAlgorithmChoice.MKLLUFactorization,
DefaultAlgorithmChoice.AppleAccelerateLUFactorization,
DefaultAlgorithmChoice.GenericLUFactorization))
newex = quote
sol = SciMLBase.solve!(cache, $(algchoice_to_alg(alg)), args...; kwargs...)
if sol.retcode === ReturnCode.Failure && alg.safetyfallback
## TODO: Add verbosity logging here about using the fallback
sol = SciMLBase.solve!(cache, QRFactorization(ColumnNorm()), args...; kwargs...)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[JuliaFormatter] reported by reviewdog 🐶

Suggested change
sol = SciMLBase.solve!(cache, QRFactorization(ColumnNorm()), args...; kwargs...)
sol = SciMLBase.solve!(
cache, QRFactorization(ColumnNorm()), args...; kwargs...)

SciMLBase.build_linear_solution(alg, sol.u, sol.resid, sol.cache;
retcode = sol.retcode,
iters = sol.iters, stats = sol.stats)
else
SciMLBase.build_linear_solution(alg, sol.u, sol.resid, sol.cache;
retcode = sol.retcode,
iters = sol.iters, stats = sol.stats)
end
end
elseif alg == Symbol(DefaultAlgorithmChoice.RFLUFactorization)
newex = quote
if !userecursivefactorization(nothing)
error("Default algorithm calling solve on RecursiveFactorization without the package being loaded. This shouldn't happen.")
end

sol = SciMLBase.solve!(cache, $(algchoice_to_alg(alg)), args...; kwargs...)
if sol.retcode === ReturnCode.Failure && alg.safetyfallback
## TODO: Add verbosity logging here about using the fallback
Expand Down
Loading