Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

Access violation exception in Pardiso call

mamey4
Beginner
367 Views
Hi,
I'm constantly getting an access violation error when I try to call Pardiso in a Visual Studio 2008 project. The basic structure of the code is:


integer value_count ivar, idum
real*8, allocatable :: myvalues(:)
integer, allocatable :: myia(:), myja(:)
INTEGER*4 pt(64)
INTEGER iparm(64)
!real*8, allocatable :: B2(:), x(:)
REAL(DP), allocatable :: B2(:), x(:)
INTEGER maxfct, mnum, mtype, phase, n, nrhs, error, msglvl

ALLOCATE(myvalues(value_count))
ALLOCATE(myja(value_count))
ALLOCATE(myia(mat_size+1))
ALLOCATE(x(mat_size))

do ivar = 1, 64
iparm(ivar) = 0
pt(ivar) = 0
end do

do ivar = 1, mat_size
!fill myvalues, myja, myia
...
x(ivar) = 0
end do

iparm(1) = 1
iparm(2) = 0
iparm(3) = 1
iparm(4) = 0
iparm(5) = 0
iparm(6) = 0
iparm(7) = 0
iparm(8) = 9
iparm(9) = 0
iparm(10) = 13
iparm(11) = 1
iparm(12) = 0
iparm(13) = 0
iparm(14) = 0
iparm(15) = 0
iparm(16) = 0
iparm(17) = 0
iparm(18) = -1
iparm(19) = -1
iparm(20) = 0
iparm(27) = 1

maxfct=1
mnum=1
nrhs=1
error = 0
msglvl = 1
mtype = -2
phase=13

!B is an input parameter of the function with type REAL(DP)
B2 = B
CALL pardiso (pt, maxfct, mnum, mtype, phase, mat_size, myvalues, myia, myja, idum, nrhs, iparm, msglvl, B2, x, error)

phase=-1

CALL pardiso (pt, maxfct, mnum, mtype, phase, mat_size, myvalues, myia, myja, idum, nrhs, iparm, msglvl, B2, x, error)


I'm working under IA32 architecture, linking and compiling works fine, only the memory error is bugging.
Does anybody have an idea?
0 Kudos
2 Replies
Konstantin_A_Intel
367 Views
Hi,
Have you also allocated B2 and X arrays? If yes, could you please attach the example (at least the function code) to this thread? It'll make issue resolution quicker.
Regards,
Konstantin
0 Kudos
mamey4
Beginner
367 Views
Aargh, yeah, I forgot the B2 allocation. Thanks :-)
0 Kudos
Reply