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
244 stars 52 forks source link

NNi method matching ldiv! for LinearProblem using matrices #516

Open orenbenkiki opened 2 months ago

orenbenkiki commented 2 months ago

Describe the bug 🐞

I'm getting the error:

ERROR: LoadError: MethodError: no method matching ldiv!(::Vector{Float64}, ::LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}, ::Matrix{Float64})

When solving a linear system MF * FG = MG.

Expected behavior

I expected solve to behave similarly to \ in this case.

Minimal Reproducible Example 👇

using LinearSolve

MF = rand(6, 4)
println("MF:")
println(MF)

FG = rand(4, 8)
println("FG:")
println(FG)

MG = MF * FG
println("MG:")
println(MG)

BS_MF = MF \ MG

println("BS_MF:")
println(BS_MF)

problem = LinearProblem(MF, MG)
solution = solve(problem)
println("LS_MF:")
println(solution.u)

Error & Stacktrace ⚠️

% julia solve_matrices.jl 
MF:
[0.7603372536901469 0.8915829617511009 0.3943268514695246 0.6408853546064058; 0.09853896950153362 0.9142750536543485 0.5653511267556065 0.9610265659051394; 0.8517421341128087 0.16994980270495197 0.40157091546118884 0.037587296187619246; 0.3170371263811872 0.47787708148762154 0.05360468924372275 0.32101179878330144; 0.017413302953701693 0.20992330190528175 0.2757627758873624 0.2957272108176492; 0.9749495447097363 0.3932454941657596 0.19088719660599807 0.6728921638837394]
FG:
[0.168354297580406 0.5625365974115835 0.7619799639172955 0.6474466161961775 0.4761047100466749 0.11127311126726624 0.60267328562918 0.01501974759732938; 0.5063342124376666 0.5276420440819914 0.8011414794392455 0.10383184959371627 0.62354559682714 0.5037398058668656 0.8708494025588381 0.7044292341596117; 0.70747497716182 0.9620375998782091 0.956813448286788 0.7004698876616168 0.556463791135336 0.4309465817182555 0.1755590988015443 0.9164982188374302; 0.0172257949118666 0.3906057384297067 0.18169653612732373 0.3817487267971905 0.7991927620108119 0.5657437011923466 0.9504548504157332 0.7048260169499977]
MG:
[0.8694611409484687 1.5278449429232424 1.7873897296452383 1.1057237435492189 1.649562329107196 1.0662415811727275 1.9130297009635997 1.45258970539577; 0.896044420257177 1.4571132672775362 1.5230991487594203 0.921611700425983 1.6996499583864444 1.2588523376395024 1.8682475840239088 1.841021933626686; 0.5141946935149218 0.9698169165605904 1.1762222108613558 0.8647410014606352 0.7649890620385513 0.3747068672803246 0.767547370623989 0.5270420942543468; 0.33879373812446045 0.6074518037143324 0.7340395096280374 0.4149777920584539 0.7353003938228361 0.48071457646019644 0.9217467896620731 0.6167784738955779; 0.30941235398624556 0.5013668849166323 0.499032994963597 0.33912791563981687 0.5289823522675763 0.3938291881708583 0.5227941408915052 0.6093099792353641; 0.5098896108312009 1.2024138569243272 1.3628429080611604 1.0626456506850168 1.3533769267455864 0.7695257662275857 1.6030992542650375 0.9408767977688842]
BS_MF:
[0.1683542975804062 0.5625365974115845 0.761979963917296 0.6474466161961776 0.47610471004667493 0.11127311126726651 0.6026732856291801 0.015019747597329068; 0.506334212437667 0.5276420440819919 0.8011414794392459 0.10383184959371655 0.6235455968271395 0.5037398058668656 0.8708494025588384 0.7044292341596109; 0.7074749771618201 0.9620375998782084 0.9568134482867877 0.7004698876616169 0.5564637911353357 0.4309465817182551 0.1755590988015443 0.9164982188374305; 0.017225794911866068 0.3906057384297059 0.18169653612732337 0.38174872679719035 0.799192762010812 0.5657437011923465 0.9504548504157329 0.7048260169499982]
ERROR: LoadError: MethodError: no method matching ldiv!(::Vector{Float64}, ::LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}, ::Matrix{Float64})

Closest candidates are:
  ldiv!(::AbstractVecOrMat, ::IdentityOperator, ::AbstractVecOrMat)
   @ SciMLOperators ~/.julia/packages/SciMLOperators/Kto0y/src/basic.jl:61
  ldiv!(::AbstractVecOrMat, ::SciMLOperators.InvertedOperator, ::AbstractVecOrMat)
   @ SciMLOperators ~/.julia/packages/SciMLOperators/Kto0y/src/basic.jl:820
  ldiv!(::AbstractVecOrMat, ::MatrixOperator, ::AbstractVecOrMat)
   @ SciMLOperators ~/.julia/packages/SciMLOperators/Kto0y/src/matrix.jl:213
  ...

Stacktrace:
  [1] _ldiv!(x::Vector{Float64}, A::LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}, b::Matrix{Float64})
    @ LinearSolve ~/.julia/packages/LinearSolve/TsBGa/src/factorization.jl:11
  [2] macro expansion
    @ ~/.julia/packages/LinearSolve/TsBGa/src/LinearSolve.jl:160 [inlined]
  [3] solve!(cache::LinearSolve.LinearCache{Matrix{Float64}, Matrix{Float64}, Vector{Float64}, SciMLBase.NullParameters, LinearSolve.DefaultLinearSolver, LinearSolve.DefaultLinearSolverInit{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Vector{Int64}}, Nothing, Nothing, Nothing, LinearAlgebra.SVD{Float64, Float64, Matrix{Float64}, Vector{Float64}}, LinearAlgebra.Cholesky{Float64, Matrix{Float64}}, LinearAlgebra.Cholesky{Float64, Matrix{Float64}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int32}}, Base.RefValue{Int32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Base.RefValue{Int64}}, LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, Nothing, Nothing}, IdentityOperator, IdentityOperator, Float64, Bool, LinearSolveAdjoint{Missing}}, alg::QRFactorization{LinearAlgebra.NoPivot}; kwargs::@Kwargs{})
    @ LinearSolve ~/.julia/packages/LinearSolve/TsBGa/src/LinearSolve.jl:144
  [4] solve!
    @ ~/.julia/packages/LinearSolve/TsBGa/src/LinearSolve.jl:144 [inlined]
  [5] macro expansion
    @ ~/.julia/packages/LinearSolve/TsBGa/src/default.jl:363 [inlined]
  [6] solve!(::LinearSolve.LinearCache{Matrix{Float64}, Matrix{Float64}, Vector{Float64}, SciMLBase.NullParameters, LinearSolve.DefaultLinearSolver, LinearSolve.DefaultLinearSolverInit{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, LinearAlgebra.QRCompactWY{Float64, Matrix{Float64}, Matrix{Float64}}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Vector{Int64}}, Nothing, Nothing, Nothing, LinearAlgebra.SVD{Float64, Float64, Matrix{Float64}, Vector{Float64}}, LinearAlgebra.Cholesky{Float64, Matrix{Float64}}, LinearAlgebra.Cholesky{Float64, Matrix{Float64}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int32}}, Base.RefValue{Int32}}, Tuple{LinearAlgebra.LU{Float64, Matrix{Float64}, Vector{Int64}}, Base.RefValue{Int64}}, LinearAlgebra.QRPivoted{Float64, Matrix{Float64}, Vector{Float64}, Vector{Int64}}, Nothing, Nothing}, IdentityOperator, IdentityOperator, Float64, Bool, LinearSolveAdjoint{Missing}}, ::LinearSolve.DefaultLinearSolver; assump::OperatorAssumptions{Nothing}, kwargs::@Kwargs{})
    @ LinearSolve ~/.julia/packages/LinearSolve/TsBGa/src/default.jl:356
  [7] solve!
    @ ~/.julia/packages/LinearSolve/TsBGa/src/default.jl:356 [inlined]
  [8] #solve!#7
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:197 [inlined]
  [9] solve!
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:196 [inlined]
 [10] #solve#6
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:193 [inlined]
 [11] solve
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:191 [inlined]
 [12] solve(::LinearProblem{Nothing, true, Matrix{Float64}, Matrix{Float64}, SciMLBase.NullParameters, @Kwargs{}}, ::Nothing; assump::OperatorAssumptions{Bool}, kwargs::@Kwargs{})
    @ LinearSolve ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:188
 [13] solve
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:186 [inlined]
 [14] #solve#4
    @ ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:183 [inlined]
 [15] solve(::LinearProblem{Nothing, true, Matrix{Float64}, Matrix{Float64}, SciMLBase.NullParameters, @Kwargs{}})
    @ LinearSolve ~/.julia/packages/LinearSolve/TsBGa/src/common.jl:182
 [16] top-level scope
    @ ~/projects/Metacells.jl/solve_matrices.jl:21
in expression starting at /Users/obk/projects/Metacells.jl/solve_matrices.jl:21```

**Environment (please complete the following information):**

  - Output of `using Pkg; Pkg.status()`

```julia
(@v1.10) pkg> status
Status `~/.julia/environments/v1.10/Project.toml`
  [4c88cf16] Aqua v0.8.7
  [1e616198] COSMO v0.8.9
  [44b605c4] CRC v4.0.0
  [336ed68f] CSV v0.10.14
  [61c947e1] Clarabel v0.9.0
  [5ae59095] Colors v0.12.11
  [f65535da] Convex v0.16.2
  [a2441757] Coverage v1.6.1
  [1375bf9c] Daf v0.1.0 `~/projects/Daf.jl`
  [a93c6f00] DataFrames v1.6.1
  [864edb3b] DataStructures v0.18.20
  [31a5f54b] Debugger v0.7.9
  [b4f34e82] Distances v0.10.11
  [31c24e10] Distributions v0.25.109
⌃ [e30172f5] Documenter v1.4.1
  [e2685f51] ECOS v1.1.2
  [f67ccb44] HDF5 v0.17.2
⌃ [7073ff75] IJulia v1.24.2
⌅ [c3a54625] JET v0.8.29
  [682c06a0] JSON v0.21.4
⌃ [98e50ef6] JuliaFormatter v1.0.56
  [2b0e0bc5] LanguageServer v4.5.1
  [7ed4a6bd] LinearSolve v2.30.2
  [e6f89c97] LoggingExtras v1.0.3
  [06cff92e] MCGraphs v0.1.0 `~/projects/MCGraphs.jl`
  [2c3fbd22] Metacells v0.1.0 `~/projects/Metacells.jl`
  [1ec41992] MosekTools v0.15.1
  [446846d7] Muon v0.2.0
  [6ef6ca0d] NMF v1.0.2
  [86f7a689] NamedArrays v0.10.2
  [58dd65bb] Plotly v0.4.1
  [f0f68f2c] PlotlyJS v0.18.13
  [c946c3f1] SCS v2.0.0
  [aa65fe97] SnoopCompile v2.10.8
  [b3cc710f] StaticLint v8.2.2
  [2913bbd2] StatsBase v0.34.3
⌅ [cf896787] SymbolServer v7.4.0
  [4239201d] ThreadSafeDicts v0.1.6
  [0f1e0344] WebIO v0.8.21
  [56ddb016] Logging
  [9a3f8284] Random
julia> Pkg.status(; mode = PKGMODE_MANIFEST)
Status `~/.julia/environments/v1.10/Manifest.toml`
  [47edcb42] ADTypes v1.5.3
  [14f7f29c] AMD v0.5.3
  [a4c015fc] ANSIColoredPrinters v0.0.1
  [1520ce14] AbstractTrees v0.4.5
  [7d9f7c33] Accessors v0.1.36
  [79e6a3ab] Adapt v4.0.4
  [66dad0bd] AliasTables v1.1.3
  [4c88cf16] Aqua v0.8.7
  [4fba245c] ArrayInterface v7.12.0
  [4c555306] ArrayLayouts v1.10.2
  [bf4720bc] AssetRegistry v0.1.0
  [6e4b80f9] BenchmarkTools v1.5.0
  [9e28174c] BinDeps v1.0.2
  [62783981] BitTwiddlingConvenienceFunctions v0.1.6
⌃ [ad839575] Blink v0.12.5
  [fa961155] CEnum v0.5.0
  [1e616198] COSMO v0.8.9
  [bbd8fffe] COSMOAccelerators v0.1.0
  [2a0fbf3d] CPUSummary v0.2.6
  [44b605c4] CRC v4.0.0
  [00ebfdb7] CSTParser v3.4.3
  [336ed68f] CSV v0.10.14
  [49dc2e85] Calculus v0.5.1
⌅ [324d7699] CategoricalArrays v0.9.7
  [d360d2e6] ChainRulesCore v1.24.0
  [61c947e1] Clarabel v0.9.0
  [fb6a15b2] CloseOpenIntervals v0.1.13
  [aaaa29a8] Clustering v0.15.7
  [da1fd8a2] CodeTracking v1.3.5
  [523fee87] CodecBzip2 v0.8.3
⌃ [944b1d66] CodecZlib v0.7.4
  [35d6a980] ColorSchemes v3.25.0
  [3da002f7] ColorTypes v0.11.5
  [c3611d14] ColorVectorSpace v0.10.0
  [5ae59095] Colors v0.12.11
  [861a8166] Combinatorics v1.0.2
  [a80b9123] CommonMark v0.8.12
  [38540f10] CommonSolve v0.2.4
  [bbf7d656] CommonSubexpressions v0.3.0
  [f70d9fcc] CommonWorldInvalidations v1.0.0
  [34da2185] Compat v4.15.0
  [a33af91c] CompositionsBase v0.1.2
  [33dc01b2] CompressHashDisplace v0.1.2
  [2569d6c7] ConcreteStructs v0.2.3
  [3df5f688] ConcurrentUtils v0.1.0
⌃ [8f4d0f93] Conda v1.10.0
  [187b0558] ConstructionBase v1.5.5
  [f65535da] Convex v0.16.2
  [a2441757] Coverage v1.6.1
  [c36e975a] CoverageTools v1.3.1
  [adafc99b] CpuId v0.3.1
  [a8cc5b0e] Crayons v4.1.1
⌃ [f68482b8] Cthulhu v2.12.6
  [1375bf9c] Daf v0.1.0 `~/projects/Daf.jl`
  [9a962f9c] DataAPI v1.16.0
  [a93c6f00] DataFrames v1.6.1
  [864edb3b] DataStructures v0.18.20
  [e2d170a0] DataValueInterfaces v1.0.0
  [31a5f54b] Debugger v0.7.9
  [8bb1440f] DelimitedFiles v1.9.1
  [163ba53b] DiffResults v1.1.0
  [b552c78f] DiffRules v1.15.1
  [b4f34e82] Distances v0.10.11
  [31c24e10] Distributions v0.25.109
  [ffbed154] DocStringExtensions v0.9.3
⌃ [e30172f5] Documenter v1.4.1
  [fa6b7ba4] DualNumbers v0.6.8
  [e2685f51] ECOS v1.1.2
  [4e289a0a] EnumX v1.0.4
  [e2ba6199] ExprTools v0.1.10
  [e189563c] ExternalDocstrings v0.1.1
  [29a986be] FastLapackInterface v2.0.4
  [5789e2e9] FileIO v1.16.3
  [48062228] FilePathsBase v0.9.21
  [1a297f60] FillArrays v1.11.0
  [53c48c17] FixedPointNumbers v0.8.5
  [08572546] FlameGraphs v1.0.0
  [1eca21be] FoldingTrees v1.2.1
  [f6369f11] ForwardDiff v0.10.36
  [069b7b12] FunctionWrappers v1.1.3
  [77dc65aa] FunctionWrappersWrappers v0.1.3
  [de31a74c] FunctionalCollections v0.5.0
  [46192b85] GPUArraysCore v0.1.6
  [92fee26a] GZip v0.6.2
  [14197337] GenericLinearAlgebra v0.3.11
  [d7ba0133] Git v1.3.1
  [c27321d9] Glob v1.3.1
  [f67ccb44] HDF5 v0.17.2
  [34c5aeac] HSL v0.4.3
⌅ [cd3eb016] HTTP v0.9.17
  [9fb69e20] Hiccup v0.2.2
  [eafb193a] Highlights v0.5.3
  [3e5b6fbb] HostCPUFeatures v0.1.17
  [34004b35] HypergeometricFunctions v0.3.23
⌃ [7073ff75] IJulia v1.24.2
  [b5f81e59] IOCapture v0.2.5
  [615f187c] IfElse v0.1.1
  [9b13fd28] IndirectArrays v1.0.0
  [83e8ac13] IniFile v0.5.1
⌃ [842dd82b] InlineStrings v1.4.0
  [3587e190] InverseFunctions v0.1.14
  [41ab1584] InvertedIndices v1.3.0
  [92d709cd] IrrationalConstants v0.2.2
  [c8e1da08] IterTools v1.10.0
  [82899510] IteratorInterfaceExtensions v1.0.0
⌅ [c3a54625] JET v0.8.29
  [692b3bcd] JLLWrappers v1.5.0
  [97c1335a] JSExpr v0.5.4
  [682c06a0] JSON v0.21.4
  [b9b8584e] JSONRPC v1.3.6
⌃ [98e50ef6] JuliaFormatter v1.0.56
⌃ [aa1ae85d] JuliaInterpreter v0.9.31
  [70703baa] JuliaSyntax v0.4.8
  [ef3ab10e] KLU v0.6.0
  [ba0b0d4f] Krylov v0.9.6
  [40e66cde] LDLFactorizations v0.10.1
  [b964fa9f] LaTeXStrings v1.3.1
  [2b0e0bc5] LanguageServer v4.5.1
  [10f19ff3] LayoutPointers v0.1.17
  [0e77f7df] LazilyInitializedFields v1.2.2
  [50d2b5c4] Lazy v0.15.1
  [5078a376] LazyArrays v2.1.7
  [1d6d02ad] LeftChildRightSiblingTrees v0.2.0
  [7ed4a6bd] LinearSolve v2.30.2
  [2ab3a3ac] LogExpFunctions v0.3.28
  [e6f89c97] LoggingExtras v1.0.3
  [bdcacae8] LoopVectorization v0.12.171
⌅ [6f1432cf] LoweredCodeUtils v2.3.2
  [06cff92e] MCGraphs v0.1.0 `~/projects/MCGraphs.jl`
  [3da0fdf6] MPIPreferences v0.1.11
  [1914dd2f] MacroTools v0.5.13
  [d125e4d3] ManualMemory v0.1.8
  [d0879d2d] MarkdownAST v0.1.2
  [b8f27783] MathOptInterface v1.31.0
  [739be429] MbedTLS v1.1.9
  [2c3fbd22] Metacells v0.1.0 `~/projects/Metacells.jl`
  [e1d29d7a] Missings v1.2.0
  [6405355b] Mosek v10.2.0
  [1ec41992] MosekTools v0.15.1
  [446846d7] Muon v0.2.0
  [b10b62ed] MurmurHash3 v1.2.0
  [ffc61752] Mustache v1.0.19
  [d8a4904e] MutableArithmetics v1.4.5
⌅ [a975b10e] Mux v0.7.6
  [6ef6ca0d] NMF v1.0.2
  [77ba4419] NaNMath v1.0.2
  [86f7a689] NamedArrays v0.10.2
  [b8a86587] NearestNeighbors v0.4.18
  [b7351bd1] NonNegLeastSquares v0.4.0
  [510215fc] Observables v0.5.5
  [6fe1bfb0] OffsetArrays v1.14.1
  [bac558e1] OrderedCollections v1.6.3
  [90014a1f] PDMats v0.11.31
  [d96e819e] Parameters v0.12.3
  [46dd5b70] Pardiso v0.5.7
  [69de0a69] Parsers v2.8.1
  [fa939f87] Pidfile v1.3.0
  [58dd65bb] Plotly v0.4.1
  [a03496cd] PlotlyBase v0.8.19
  [f0f68f2c] PlotlyJS v0.18.13
  [f2990250] PlotlyKaleido v2.2.4
  [f517fe37] Polyester v0.7.15
  [1d0040c9] PolyesterWeave v0.2.2
  [2dfb63ee] PooledArrays v1.4.3
  [aea7be01] PrecompileTools v1.2.1
  [21216c6a] Preferences v1.4.3
  [08abe8d2] PrettyTables v2.3.2
  [43287f4e] PtrArrays v1.2.0
  [bfc457fd] QDLDL v0.4.1
  [1fd47b50] QuadGK v2.9.4
  [0448d7d9] RandomizedLinAlg v0.1.0
  [3cdcf5f2] RecipesBase v1.3.4
  [731186ca] RecursiveArrayTools v3.26.0
  [f2c3362d] RecursiveFactorization v0.2.23
  [189a3867] Reexport v1.2.2
  [2792f1a3] RegistryInstances v0.1.0
  [ae029012] Requires v1.3.0
⌃ [295af30f] Revise v3.5.14
  [79098fc4] Rmath v0.7.1
  [7e49a35a] RuntimeGeneratedFunctions v0.5.13
  [c946c3f1] SCS v2.0.0
  [94e857df] SIMDTypes v0.1.0
  [476501e8] SLEEFPirates v0.6.43
  [0bca4576] SciMLBase v2.42.0
  [c0aeaf25] SciMLOperators v0.3.8
  [53ae85a6] SciMLStructures v1.4.1
⌃ [91c51154] SentinelArrays v1.4.3
  [efcf1570] Setfield v1.1.1
  [aa65fe97] SnoopCompile v2.10.8
  [e2b509da] SnoopCompileCore v2.10.1
  [66db9d55] SnoopPrecompile v1.0.3
  [b85f4697] SoftGlobalScope v1.1.0
  [a2af1166] SortingAlgorithms v1.2.1
  [e56a9233] Sparspak v0.3.9
  [276daf66] SpecialFunctions v2.4.0
  [aedffcd0] Static v1.1.0
  [0d7ed370] StaticArrayInterface v1.5.1
  [90137ffa] StaticArrays v1.9.7
  [1e83bf80] StaticArraysCore v1.4.3
  [b3cc710f] StaticLint v8.2.2
  [82ae8749] StatsAPI v1.7.0
  [2913bbd2] StatsBase v0.34.3
  [4c63d2b9] StatsFuns v1.3.1
  [7792a7ef] StrideArraysCore v0.5.7
  [69024149] StringEncodings v0.3.7
  [892a3eda] StringManipulation v0.3.4
  [354b36f9] StringViews v1.3.3
  [09ab397b] StructArrays v0.6.18
  [856f2bd8] StructTypes v1.10.0
⌅ [cf896787] SymbolServer v7.4.0
  [2efcf032] SymbolicIndexingInterface v0.3.26
  [3783bdb8] TableTraits v1.0.1
  [bd369af6] Tables v1.11.1
  [62fd8b95] TensorCore v0.1.1
⌅ [76b0de8b] TestItemDetection v0.2.0
  [4239201d] ThreadSafeDicts v0.1.6
  [8290d209] ThreadingUtilities v0.5.2
  [a759f4b9] TimerOutputs v0.5.24
  [0796e94c] Tokenize v0.5.29
⌅ [3bb67fe8] TranscodingStreams v0.10.9
  [d5829a12] TriangularSolve v0.2.1
  [bf1d0ff0] Try v0.1.1
  [d265eb64] TypedSyntax v1.3.1
  [30578b45] URIParser v0.4.1
  [5c2747f8] URIs v1.5.1
  [3a884ed6] UnPack v1.0.2
  [c4a57d5a] UnsafeArrays v1.0.5
⌅ [013be700] UnsafeAtomics v0.1.0
  [3d5dd08c] VectorizationBase v0.21.70
  [81def892] VersionParsing v1.3.0
  [ea10d353] WeakRefStrings v1.4.2
  [0f1e0344] WebIO v0.8.21
⌃ [104b5d7c] WebSockets v1.5.9
  [cc8bc4a8] Widgets v0.6.6
  [b8c1c048] WidthLimitedIO v1.0.1
  [76eceee3] WorkerUtilities v1.6.1
  [ddb6d928] YAML v0.4.11
⌃ [c2297ded] ZMQ v1.2.5
  [6e34b625] Bzip2_jll v1.0.8+1
  [c2c64177] ECOS_jll v200.0.800+0
  [2e619515] Expat_jll v2.6.2+0
  [f8c6e375] Git_jll v2.44.0+2
⌃ [0234f1f7] HDF5_jll v1.14.2+1
  [017b0a0e] HSL_jll v3.0.0+0
⌃ [e33a78d0] Hwloc_jll v2.10.0+0
  [1d5cc7b8] IntelOpenMP_jll v2024.2.0+0
  [f7e6163d] Kaleido_jll v0.2.1+0
  [1d63c593] LLVMOpenMP_jll v15.0.7+0
  [94ce4f54] Libiconv_jll v1.17.0+0
  [856f044c] MKL_jll v2024.2.0+0
  [7cb0a576] MPICH_jll v4.2.1+1
  [f1f71cc9] MPItrampoline_jll v5.4.0+0
  [9237b28f] MicrosoftMPI_jll v10.1.4+2
⌅ [656ef2d0] OpenBLAS32_jll v0.3.24+0
  [fe0851c0] OpenMPI_jll v5.0.3+0
  [458c3c95] OpenSSL_jll v3.0.14+0
  [efe28fd5] OpenSpecFun_jll v0.5.5+0
  [f50d1b31] Rmath_jll v0.4.2+0
⌅ [f4f2fc5b] SCS_jll v3.2.4+1
  [8f1865be] ZeroMQ_jll v4.3.5+0
  [477f73a3] libaec_jll v1.1.2+0
  [a9144af2] libsodium_jll v1.0.20+0
  [1317d2d5] oneTBB_jll v2021.12.0+0
  [0dad84c5] ArgTools v1.1.1
  [56f22d72] Artifacts
  [2a0f44e3] Base64
  [ade2ca70] Dates
  [8ba89e20] Distributed
  [f43a241f] Downloads v1.6.0
  [7b1f6079] FileWatching
  [9fa8497b] Future
  [b77e0a4c] InteractiveUtils
  [4af54fe1] LazyArtifacts
  [b27032c2] LibCURL v0.6.4
  [76f85450] LibGit2
  [8f399da3] Libdl
  [37e2e46d] LinearAlgebra
  [56ddb016] Logging
  [d6f4376e] Markdown
  [a63ad114] Mmap
  [ca575930] NetworkOptions v1.2.0
  [44cfe95a] Pkg v1.10.0
  [de0858da] Printf
  [9abbd945] Profile
  [3fa0cd96] REPL
  [9a3f8284] Random
  [ea8e919c] SHA v0.7.0
  [9e88b42a] Serialization
  [6462fe0b] Sockets
  [2f01184e] SparseArrays v1.10.0
  [10745b16] Statistics v1.10.0
  [4607b0f0] SuiteSparse
  [fa267f1f] TOML v1.0.3
  [a4e569a6] Tar v1.10.0
  [8dfed614] Test
  [cf7118a7] UUIDs
  [4ec0a83e] Unicode
  [e66e0078] CompilerSupportLibraries_jll v1.1.1+0
  [deac9b47] LibCURL_jll v8.4.0+0
  [e37daf67] LibGit2_jll v1.6.4+0
  [29816b5a] LibSSH2_jll v1.11.0+1
  [c8ffd9c3] MbedTLS_jll v2.28.2+1
  [14a3606d] MozillaCACerts_jll v2023.1.10
  [4536629a] OpenBLAS_jll v0.3.23+4
  [05823500] OpenLibm_jll v0.8.1+2
  [efcefdf7] PCRE2_jll v10.42.0+1
  [bea87d4a] SuiteSparse_jll v7.2.1+1
  [83775a58] Zlib_jll v1.2.13+1
  [8e850b90] libblastrampoline_jll v5.8.0+1
  [8e850ede] nghttp2_jll v1.52.0+1
  [3f19e933] p7zip_jll v17.4.0+2
julia> versioninfo()
Julia Version 1.10.4
Commit 48d4fd48430 (2024-06-04 10:41 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 14 × Apple M3 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, apple-m1)
Threads: 1 default, 0 interactive, 1 GC (on 10 virtual cores)
Environment:
  JULIA_DEBUG = Writers,Boxes,IdentifyGenes,Extractors,Programs
ChrisRackauckas commented 1 week ago

A is assumed to be a linear operator on the object of b. As a vector, b is interpreted as its value vec(b). So it's not sized to work. What you're trying to do here is a batch of linear solves, which implicitly occurs via matrix \ matrix, but in a general sense with general linear operators it's making many more assumptions and we're not quite ready to handle the general case (think Krylov methods), so right now it avoids the batch case.

orenbenkiki commented 1 week ago

I thought it was a simple matter of inverting the T(A)A matrix once and applying it to the B matrix? And similarly to other solvers?