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
248 stars 53 forks source link

LinearSolve broken on Julia v1.7 #330

Closed jonas-schulze closed 1 year ago

jonas-schulze commented 1 year ago

One of our internal CI pipelines blew up for the julia:1.7 container. It looks like 0e9cdbe broke LinearSolve on Julia v1.7. Here is the output when adding LinearSolve locally to a fresh temporary environment:

(jl_lJAt0J) pkg> st
      Status `/tmp/jl_lJAt0J/Project.toml`
  [7ed4a6bd] LinearSolve v2.1.13

julia> using LinearSolve
[ Info: Precompiling LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae]
ERROR: LoadError: MethodError: no method matching cholesky(::Matrix{Float64}, ::LinearAlgebra.NoPivot; check=false)
Closest candidates are:
  cholesky(::Union{Union{LinearAlgebra.Hermitian{var"#s856", var"#s855"}, LinearAlgebra.Hermitian{Complex{var"#s856"}, var"#s855"}, LinearAlgebra.Symmetric{var"#s856", var"#s855"}} where {var"#s856"<:Real, var"#s855"<:(StridedMatrix{T} where T)}, StridedMatrix}) at ~/opt/julia-1.7.3/share/julia/stdlib/v1.7/LinearAlgebra/src/cholesky.jl:394 got unsupported keyword argument "check"
  cholesky(::Union{Union{LinearAlgebra.Hermitian{var"#s854", var"#s853"}, LinearAlgebra.Hermitian{Complex{var"#s854"}, var"#s853"}, LinearAlgebra.Symmetric{var"#s854", var"#s853"}} where {var"#s854"<:Real, var"#s853"<:(StridedMatrix{T} where T)}, StridedMatrix}, ::Val{false}; check) at ~/opt/julia-1.7.3/share/julia/stdlib/v1.7/LinearAlgebra/src/cholesky.jl:394
  cholesky(::Union{Union{LinearAlgebra.Hermitian{var"#s857", var"#s856"}, LinearAlgebra.Hermitian{Complex{var"#s857"}, var"#s856"}, LinearAlgebra.Symmetric{var"#s857", var"#s856"}} where {var"#s857"<:Real, var"#s856"<:(StridedMatrix{T} where T)}, StridedMatrix}, ::Val{true}; tol, check) at ~/opt/julia-1.7.3/share/julia/stdlib/v1.7/LinearAlgebra/src/cholesky.jl:454
  ...
Stacktrace:
  [1] cholesky_instance(A::Matrix{Float64}, pivot::LinearAlgebra.NoPivot)
    @ ArrayInterface ~/.julia/packages/ArrayInterface/Qj79i/src/ArrayInterface.jl:483
  [2] top-level scope
    @ ~/.julia/packages/LinearSolve/tJWKq/src/factorization.jl:256
  [3] include(mod::Module, _path::String)
    @ Base ./Base.jl:418
  [4] include(x::String)
    @ LinearSolve ~/.julia/packages/LinearSolve/tJWKq/src/LinearSolve.jl:1
  [5] top-level scope
    @ ~/.julia/packages/LinearSolve/tJWKq/src/LinearSolve.jl:83
  [6] include
    @ ./Base.jl:418 [inlined]
  [7] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt64}}, source::Nothing)
    @ Base ./loading.jl:1318
  [8] top-level scope
    @ none:1
  [9] eval
    @ ./boot.jl:373 [inlined]
 [10] eval(x::Expr)
    @ Base.MainInclude ./client.jl:453
 [11] top-level scope
    @ none:1
in expression starting at /home/jschulze/.julia/packages/LinearSolve/tJWKq/src/factorization.jl:256
in expression starting at /home/jschulze/.julia/packages/LinearSolve/tJWKq/src/LinearSolve.jl:1
ERROR: Failed to precompile LinearSolve [7ed4a6bd-45f5-4d41-b270-4a48e9bafcae] to /home/jschulze/.julia/compiled/v1.7/LinearSolve/jl_hMYlqM.
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:33
 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, ignore_loaded_modules::Bool)
   @ Base ./loading.jl:1466
 [3] compilecache(pkg::Base.PkgId, path::String)
   @ Base ./loading.jl:1410
 [4] _require(pkg::Base.PkgId)
   @ Base ./loading.jl:1120
 [5] require(uuidkey::Base.PkgId)
   @ Base ./loading.jl:1013
 [6] require(into::Module, mod::Symbol)
   @ Base ./loading.jl:997

julia> versioninfo()
Julia Version 1.7.3
Commit 742b9abb4d (2022-05-06 12:58 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: 12th Gen Intel(R) Core(TM) i5-12600K
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, goldmont)
Environment:
  JULIA_PROJECT = @.
ChrisRackauckas commented 1 year ago

Handling it in https://github.com/SciML/LinearSolve.jl/pull/332

jonas-schulze commented 1 year ago

I re-ran the pipeline yesterday and can confirm that the problem is solved in LinearSolve v2.2.1. Thanks for the quick fix, @ChrisRackauckas!

ChrisRackauckas commented 1 year ago

No problem, thanks for the clear report.