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

Julia crashing (possibly due to project Pardiso version)

Open lkapelevich opened this issue 5 years ago • 7 comments

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.

lkapelevich avatar Sep 18 '20 17:09 lkapelevich

I haven't tried this at all personally with Pardiso 7. Did they change any of the API?

KristofferC avatar Sep 18 '20 17:09 KristofferC

I'm not sure. I have't seen any references online. I also emailed to ask but haven't heard back :-).

lkapelevich avatar Sep 18 '20 17:09 lkapelevich

The manual for Pardiso 7.2 is now online https://pardiso-project.org/manual/manual.pdf though I haven't looked through it

lkapelevich avatar Dec 28 '20 19:12 lkapelevich

the same is happening here. Is there a way to try with older versions of Pardiso?

rcesarpacheco avatar Dec 30 '20 18:12 rcesarpacheco

Are the older versions not available for download?

KristofferC avatar Dec 31 '20 09:12 KristofferC

Nope. I sent them an email asking for an older version. Waiting for the answer.

rcesarpacheco avatar Jan 04 '21 01:01 rcesarpacheco

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.

jwittke avatar Jan 16 '21 14:01 jwittke