Skip to content

Commit 239697f

Browse files
Merge pull request #579 from ErikQQY/qqy/sparspak
Fix sparspak init_cacheval
2 parents b9668a4 + f8ede44 commit 239697f

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

docs/src/tutorials/accelerating_choices.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
Great, you've learned how to use LinearSolve.jl and you're using it daily,
1010
either directly or through other SciML libraries, and you want to improve
1111
your performance. How can this be done? While it might seem at first like a
12-
hopeless endevour, "A\b uses a BLAS library and so it's already highly optimized
12+
hopeless endeavour, "A\b uses a BLAS library and so it's already highly optimized
1313
C code", it turns out there are many factors you need to consider to squeeze out
1414
the last 10x of performance. And yes, it can be about a factor of 10 in some
1515
scenarios, so let's dive in.

ext/LinearSolveSparspakExt.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function LinearSolve.init_cacheval(
1717
end
1818

1919
function LinearSolve.init_cacheval(
20-
::SparspakFactorization, A, b, u, Pl, Pr, maxiters::Int, abstol,
20+
::SparspakFactorization, A::AbstractSparseMatrixCSC, b, u, Pl, Pr, maxiters::Int, abstol,
2121
reltol,
2222
verbose::Bool, assumptions::OperatorAssumptions)
2323
A = convert(AbstractMatrix, A)

src/KLU/klu.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function kluerror(status::Integer)
5757
elseif status == KLU_INVALID
5858
throw(ArgumentError("Invalid Status"))
5959
elseif status == KLU_TOO_LARGE
60-
throw(OverflowError("Integer overflow has occured"))
60+
throw(OverflowError("Integer overflow has occurred"))
6161
else
6262
throw(ErrorException("Unknown KLU error code: $status"))
6363
end

src/iterative_wrappers.jl

+3-2
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,9 @@ function init_cacheval(alg::KrylovJL, A, b, u, Pl, Pr, maxiters::Int, abstol, re
238238
end
239239

240240
# Krylov.jl tries to init with `ArrayPartition(undef, ...)`. Avoid hitting that!
241-
function init_cacheval(alg::LinearSolve.KrylovJL, A, b::RecursiveArrayTools.ArrayPartition, u, Pl, Pr,
242-
maxiters::Int, abstol, reltol, verbose::Bool, ::LinearSolve.OperatorAssumptions)
241+
function init_cacheval(
242+
alg::LinearSolve.KrylovJL, A, b::RecursiveArrayTools.ArrayPartition, u, Pl, Pr,
243+
maxiters::Int, abstol, reltol, verbose::Bool, ::LinearSolve.OperatorAssumptions)
243244
return nothing
244245
end
245246

0 commit comments

Comments
 (0)