JuliaSparse / Pardiso.jl

Calling the PARDISO library from Julia
Other
100 stars 27 forks source link

"ERROR: Input inconsistent." and test not passing when using Julia together with MKL.jl #64

Closed carlomontec closed 4 years ago

carlomontec commented 4 years ago

Hello, I am using Julia v1.3 compiled with MKL with latest Pardiso.jl v.0.5.0 and I cant pass the tests nor perform the examples in the Readme.

julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
  JULIA_NUM_THREADS = 4
julia> LinearAlgebra.versioninfo()
BLAS: libmkl_rt
LAPACK: libmkl_rt

with this output for the small example:


julia> solve!(ps, X, A, B)
ERROR: Input inconsistent.
Stacktrace:
 [1] check_error at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/mkl_pardiso.jl:70 [inlined]
 [2] ccall_pardiso(::MKLPardisoSolver, ::Int32, ::Array{Float64,1}, ::Array{Int32,1}, ::Array{Int32,1}, ::Int32, ::Array{Float64,2}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/mkl_pardiso.jl:66
 [3] pardiso(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:335
 [4] solve!(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}, ::Symbol) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:271
 [5] solve!(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:228
 [6] top-level scope at REPL[31]:1

and this one for the test of Package:


┌ Warning: Not testing project Pardiso solver
└ @ Main ~/.julia/packages/Pardiso/GDj1P/test/runtests.jl:15
Testing DataType[MKLPardisoSolver]
solving: Error During Test at /home/monjaraz/.julia/packages/Pardiso/GDj1P/test/runtests.jl:21
  Got exception outside of a @test
  Input inconsistent.
  Stacktrace:
   [1] check_error at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/mkl_pardiso.jl:70 [inlined]
   [2] ccall_pardiso(::MKLPardisoSolver, ::Int32, ::Array{Float64,1}, ::Array{Int32,1}, ::Array{Int32,1}, ::Int32, ::Array{Float64,2}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/mkl_pardiso.jl:66
   [3] pardiso(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:335
   [4] solve!(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}, ::Symbol) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:271
   [5] solve!(::MKLPardisoSolver, ::Array{Float64,2}, ::SparseMatrixCSC{Float64,Int64}, ::Array{Float64,2}) at /home/monjaraz/.julia/packages/Pardiso/GDj1P/src/Pardiso.jl:228
   [6] top-level scope at /home/monjaraz/.julia/packages/Pardiso/GDj1P/test/runtests.jl:30
   [7] top-level scope at /home/monjaraz/Software/julia/juliaMKL/usr/share/julia/stdlib/v1.3/Test/src/Test.jl:1107
   [8] top-level scope at /home/monjaraz/.julia/packages/Pardiso/GDj1P/test/runtests.jl:22
   [9] include at ./boot.jl:328 [inlined]
   [10] include_relative(::Module, ::String) at ./loading.jl:1105
   [11] include(::Module, ::String) at ./Base.jl:31
   [12] include(::String) at ./client.jl:424
   [13] top-level scope at none:6
   [14] eval(::Module, ::Any) at ./boot.jl:330
   [15] exec_options(::Base.JLOptions) at ./client.jl:263
   [16] _start() at ./client.jl:460

In the same computer with the same MKL Julia 1.2 official binary seems to be fine. Is this due to the use of a compiled version with MKL? Thank you very much.

KristofferC commented 4 years ago

Is this due to the use of a compiled version with MKL?

Yes, it is due to this line https://github.com/JuliaComputing/MKL.jl/blob/master/src/MKL.jl#L47 changing the size of integers that MKL expects. I will see if I can workaround it.

KristofferC commented 4 years ago

Please try with https://github.com/JuliaSparse/Pardiso.jl/pull/65.

carlomontec commented 4 years ago

using (v1.3) pkg> add Pardiso#kc/mkl_ilp64

all tests passed. Thanks so much!