Does anybody have experience with the calculation of inv(A)*B in Julia, where A and B are large sparse matrices?
When I used zz = A\B in Julia. It shows the following error in Julia
MethodError: no method matching ldiv!(::SuiteSparse.UMFPACK.UmfpackLU{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64})
Closest candidates are:
ldiv!(!Matched::Number, ::AbstractArray) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\generic.jl:152
ldiv!(!Matched::LinearAlgebra.LU{T,LinearAlgebra.Tridiagonal{T,V}}, ::Union{AbstractArray{T,2}, AbstractArray{T,1}} where T) where {T, V} at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\lu.jl:523
ldiv!(!Matched::LinearAlgebra.Transpose{#s617,#s616} where #s616<:LinearAlgebra.LU{T,LinearAlgebra.Tridiagonal{T,V}} where #s617, ::Union{AbstractArray{T,2}, AbstractArray{T,1}} where T) where {T, V} at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\lu.jl:555
...
Stacktrace:
[1] \(::SuiteSparse.UMFPACK.UmfpackLU{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\factorization.jl:87
[2] \(::SparseArrays.SparseMatrixCSC{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\SparseArrays\src\linalg.jl:1374
[3] top-level scope at In[5]:1
```![wktBM|592x499](upload://pFiCUnwBi5tsGuciDEaMhO8sxqw.png)![wktBM|592x499](upload://pFiCUnwBi5tsGuciDEaMhO8sxqw.png)
MethodError: no method matching ldiv!(::SuiteSparse.UMFPACK.UmfpackLU{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64})
Closest candidates are:
ldiv!(!Matched::Number, ::AbstractArray) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\generic.jl:152
ldiv!(!Matched::LinearAlgebra.LU{T,LinearAlgebra.Tridiagonal{T,V}}, ::Union{AbstractArray{T,2}, AbstractArray{T,1}} where T) where {T, V} at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\lu.jl:523
ldiv!(!Matched::LinearAlgebra.Transpose{#s617,#s616} where #s616<:LinearAlgebra.LU{T,LinearAlgebra.Tridiagonal{T,V}} where #s617, ::Union{AbstractArray{T,2}, AbstractArray{T,1}} where T) where {T, V} at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\lu.jl:555
…
Stacktrace:
[1] (::SuiteSparse.UMFPACK.UmfpackLU{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\LinearAlgebra\src\factorization.jl:87
[2] (::SparseArrays.SparseMatrixCSC{Float64,Int64}, ::SparseArrays.SparseMatrixCSC{Float64,Int64}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.2\SparseArrays\src\linalg.jl:1374
[3] top-level scope at In[5]:1
Yes, it would require a lot of memory to store that. What is the reason for doing this computation though? If this is some type of discretized problem where K is a “stiffness matrix” and M a “mass matrix” then I don’t see why you are doing K \ M.