SciML / LinearSolve.jl

LinearSolve.jl: High-Performance Unified Interface for Linear Solvers in Julia. Easily switch between factorization and Krylov methods, add preconditioners, and all in one interface.
https://docs.sciml.ai/LinearSolve/stable/
Other
245 stars 52 forks source link

no method matching solve!(::LinearSolve.LinearCache.... #315

Closed rouckas closed 1 year ago

rouckas commented 1 year ago

I am using LinearSolve v1.42.0 on Julia 1.9.0. When trying to run the basic caching example from LinearSolve docs:

using LinearSolve

n = 4
A = rand(n, n)
b1 = rand(n);
b2 = rand(n);
prob = LinearProblem(A, b1)

linsolve = init(prob)
sol1 = solve!(linsolve)

I am getting the following error:

MethodError: no method matching solve!(::LinearSolve.LinearCache{Matrix{Float64}, Vector{Float64}, Vector{Float64}, SciMLBase.NullParameters, GenericLUFactorization{LinearAlgebra.RowMaximum}, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, SciMLOperators.IdentityOperator, SciMLOperators.IdentityOperator, Float64, true, LinearSolve.OperatorCondition.IllConditioned})

Closest candidates are:
  solve!(::SciMLBase.AbstractOptimizationCache)
   @ SciMLBase ~/.julia/packages/SciMLBase/qp2gL/src/solve.jl:161

Stacktrace:
 [1] top-level scope
   @ In[1]:10

Any help would be appreciated.

ChrisRackauckas commented 1 year ago

Those docs on the dev version are for LinearSolve v2 which isn't released yet (releasing today). On the previous version (v1.42) it was just solve.