Is there a way to use MKLPardisoSolver or other parallel solver with KLU?

Does MKLPardisoSolver only accept matrix inputs?

A= sprand(10000, 10000, 0.1);
II= rand(10000, 2);    # typeof(II) is Matrix{Float64} (alias for Array{Float64, 2})
V= zeros(10000, 2);  
ps = MKLPardisoSolver()
solve!(ps, V, A, II); # it works
II= vec(II);      # typeof(V) is Vector{Float64} (alias for Array{Float64, 1})
V = vec(V);
solve!(ps, V, A, II); # it does not work
julia> ERROR: DimensionMismatch: matrix has 10000 rows, RHS has 20000 rows.

The error says DimensionMismatch and refers to the number of rows, not to matrix vs vector.

V and II should have 10000 rows, but when you turn them into vectors they have 20000.


II= II[:, 1]
V = V[:, 1]

instead of

Thank you very much for your reply. I continued to use the MKLPardisoSolver with KLU, but it seems it can only accept SparseMatrix. Is that correct?

  • Any way now to solve in parallel with klu?
julia> factor = klu(A_Mat);
julia> @btime solve!(ps, $V_Mat, $factor, $I_Mat);
ERROR: MethodError: no method matching solve!(::MKLPardisoSolver, ::Vector{Float64}, ::KLU.KLUFactorization{Float64, Int64}, ::Vector{Float64})