Pardiso.jl
Pardiso.jl copied to clipboard
Julia crashing (possibly due to project Pardiso version)
I am seeing crashing/segfaults from Pardiso.jl with (project) Pardiso.
I'm not sure if this is related, but the version of Pardiso that I got with my academic license was labelled as 7.0, though I get output that includes headers with PARDISO 6.0.0 in them.
The crashing is stochastic, the following code copied from one of the examples seems to triggers it:
using Pardiso
using SparseArrays
using Random
using Printf
using Test
verbose = true
n = 4 # The number of equations.
m = 3 # The number of right-hand sides.
A = sparse([ 1. 0 -2 3
0 5 1 2
-2 1 4 -7
3 2 -7 5 ])
B = rand(n,m)
ps = PardisoSolver()
if verbose
set_msglvl!(ps, Pardiso.MESSAGE_LEVEL_ON)
end
set_matrixtype!(ps, Pardiso.REAL_SYM_INDEF)
pardisoinit(ps)
fix_iparm!(ps, :N)
A_pardiso = get_matrix(ps, A, :N)
set_phase!(ps, Pardiso.ANALYSIS)
set_perm!(ps, randperm(n))
pardiso(ps, A_pardiso, B)
@printf("The factors have %d nonzero entries.\n", get_iparm(ps, 18))
set_phase!(ps, Pardiso.NUM_FACT)
pardiso(ps, A_pardiso, B)
set_phase!(ps, Pardiso.SOLVE_ITERATIVE_REFINE)
julia> B
malloc(): invalid size (unsorted)
signal (6): Aborted
in expression starting at REPL[24]:1
I'm using Julia 1.6.0.
I haven't tried this at all personally with Pardiso 7. Did they change any of the API?
I'm not sure. I have't seen any references online. I also emailed to ask but haven't heard back :-).
The manual for Pardiso 7.2 is now online https://pardiso-project.org/manual/manual.pdf though I haven't looked through it
the same is happening here. Is there a way to try with older versions of Pardiso?
Are the older versions not available for download?
Nope. I sent them an email asking for an older version. Waiting for the answer.
I had several similar experiences (segfaults) using the newest version as well as older ones when trying to interface with the library directly (Python & Fortran). If I ensure that the parameters MAXFCT and MNUM are initialized with 1 in advance, everything worked.