Open Alexander-Barth opened 3 years ago
It seems loading MKLSparse breaks things. My guess is that https://github.com/JuliaSparse/MKLSparse.jl/blob/6060cd08a2586b275c95aac650c379ff48130ef7/src/MKLSparse.jl#L6 sets MKL in 64 bit mode but Pardiso.jl assumes that integers should be passed to MKL as 32 bits (unless https://github.com/JuliaSparse/Pardiso.jl/blob/81c8391e86cebaf71e936363664d878b22b1fd9a/src/Pardiso.jl#L29-L30 is true, but this is not the case here).
Perfect! Indeed without loading MKLSparse
the code works! Thank you very much!
Well, not perfect :P. We should figure out a way to make the two packages collaborate.
It is indeed surprising that pardiso still uses 32-bit integers.
For your information, on my system LinearAlgebra.BLAS.vendor()
is :openblas64
and LinearAlgebra.BlasInt
is Int64
.
I am wondering if we can use the same logic than in MKLSparse to determine MklInt
.
const MklInt = (Base.USE_BLAS64 ? Int64 : Int32)
# or simply?
const MklInt = LinearAlgebra.BlasInt
The problem is that SparseMatrices in Julia has Int64
indices in almost all cases. So the code in MKLSparse doesn't really make sense (LinearAlgebra.BlasInt
) is pretty much irrelevant to sparse matrices.
It's just kinda hard how to do this properly because the MKL Interface state is global and packages use it like it is their own local setting to play with.
Any work around for using both Pardiso and MKLSparse? Using SparseMatrices with Ti=Int32 only?
I just tried to run the example in the README.md with
MKLPardisoSolver
. I use MKLSparse v1.1.0 and Pardiso v0.5.1 in Julia 1.5.1. MKL is installed automatically by MKLSparse. Does somebody have any idea what could be the issue? The input matrix sizes seem to be correct.Thank you for this nice package!
Example script:
Error message:
Environment: