Pardiso.jl icon indicating copy to clipboard operation
Pardiso.jl copied to clipboard

Crash Issue!

Open Amuri44 opened this issue 3 years ago • 7 comments

I am meeting an issue when trying to run the below code. The REPL crashes by showing a message very quickly and disappear.

Any cause for that? Given that I have Julia Version 1.8.0-beta1 downloaded from [Download Julia]

Amuri44 avatar May 27 '22 21:05 Amuri44

Strange... On linux it works with 1.7.2 and 1.8-beta3. You seem to have run it from VSCode. Could you try the same outside of VSCode, just from the Julia prompt, and with the newest beta ?

j-fu avatar May 28 '22 10:05 j-fu

Strange... On linux it works with 1.7.2 and 1.8-beta3. You seem to have run it from VSCode. Could you try the same outside of VSCode, just from the Julia prompt, and with the newest beta ? I run the code from outside the VSCode, and I got this: image

Another issue is there any way to work with MKLPardisoSolver() and with KLU factorization such as :

ps = MKLPardisoSolver()
A = sparse(rand(10, 10))
B = rand(10, 2)
X = zeros(10, 2)
solve!(ps, X, KLUFactorization(A), B)

Amuri44 avatar May 29 '22 17:05 Amuri44

Ok, there seems to be a problem with pardiso_mkl. But we also need to make sure that this is not due to an indexing error in the sparse matrix submitted. Does \ work with that matrix ? Can you make an MWE so that it is possible to try to recreate the error on another machine ?

As for KLUFactorization, with nearly 100% probability this will not work. And once you have the KLUFactorization anyway, why do you want to use Pardiso at all ?

j-fu avatar Jun 01 '22 12:06 j-fu

There is also matrix checkers: https://github.com/JuliaSparse/Pardiso.jl#matrix-and-vector-checkers.

In MKL PARDISO this is instead done by setting IPARM[27] to 1 before calling pardiso.

You might want to try that.

KristofferC avatar Jun 01 '22 12:06 KristofferC

@KristofferC , thanks for your reply!

There is also matrix checkers: https://github.com/JuliaSparse/Pardiso.jl#matrix-and-vector-checkers.

I tried to check but got:

julia> checkmatrix(ps, A)
ERROR: MethodError: no method matching checkmatrix(::MKLPardisoSolver, ::SparseMatrixCSC{Float64, Int64})

It seems that this checker works only with PardisoSolver not MKLPardisoSolver. Actually, I could load a pardiso library as it is no longer free, starting from this year.

julia> pss = PardisoSolver()
ERROR: pardiso library was not loaded

Amuri44 avatar Jun 01 '22 19:06 Amuri44

@j-fu Thanks for your reply:

Ok, there seems to be a problem with pardiso_mkl. But we also need to make sure that this is not due to an indexing error in the sparse matrix submitted. Does \ work with that matrix ? Can you make an MWE so that it is possible to try to recreate the error on another machine ?

  • Yes, it works with \
  • I am not sure if making MWE is easy. Instead, I saved the matrix and vector from my code into recordedFile.jld2 (in the below recordedFile.zip). recordedFile.zip Then, running below will have a crash
using Pardiso, SparseArrays, LinearAlgebra, JLD2
A, B = load("$(@__DIR__)/recordedFile.jld2", "A", "B");
ps = MKLPardisoSolver();
X = zeros(size(B))
solve!(ps, X, A, B)

As for KLUFactorization, with nearly 100% probability this will not work. And once you have the KLUFactorization anyway, why do you want to use Pardiso at all ?

  • Cause I have a big matrix (such as in the example above) and I thing it is worthy to solve it on parallel

Amuri44 avatar Jun 01 '22 20:06 Amuri44

Any help on that?

Amuri44 avatar Jun 16 '22 17:06 Amuri44