Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash Issue! #89

Open
Amuri44 opened this issue May 27, 2022 · 7 comments
Open

Crash Issue! #89

Amuri44 opened this issue May 27, 2022 · 7 comments

Comments

@Amuri44
Copy link

Amuri44 commented May 27, 2022

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]

@j-fu
Copy link
Collaborator

j-fu commented May 28, 2022

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 ?

@Amuri44
Copy link
Author

Amuri44 commented May 29, 2022

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)

@j-fu
Copy link
Collaborator

j-fu commented Jun 1, 2022

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 ?

@KristofferC
Copy link
Member

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.

@Amuri44
Copy link
Author

Amuri44 commented Jun 1, 2022

@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
Copy link
Author

Amuri44 commented Jun 1, 2022

@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
Copy link
Author

Amuri44 commented Jun 16, 2022

Any help on that?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants