Here is a very small program that solves two linear equations using the MKL DSS interface to Pardiso. First, the test program:
program ptmkl
use mkl_dss
implicit none
TYPE (MKL_DSS_HANDLE) :: handle
INTEGER opt,dss_err
INTEGER, PARAMETER :: NEQ=2, NNZM=NEQ*NEQ
INTEGER :: rowIDX(NEQ+1) = [1,3,5]
INTEGER :: COL(NNZM) = [1,2, 1,2]
INTEGER :: i,j,k, n = NEQ, nnz = NNZM, perm(NEQ)
DOUBLE PRECISION :: A(NNZM) = [1d0, -1d-2, -1d-2, 1d0]
DOUBLE PRECISION :: B(NEQ) = [1d0, 2d0], X(NEQ)
opt=MKL_DSS_DEFAULTS
dss_err = dss_create(handle, opt)
write(*,10)'Create ',dss_err
dss_err = dss_define_structure(handle,opt,rowIDX,n,n,COL,nnz)
write(*,10)'Define ',dss_err
dss_err = dss_reorder(handle,opt,perm)
write(*,10)'ReOrder',dss_err
dss_err = dss_factor_real(handle,opt,A)
write(*,10)'Factor ',dss_err
dss_err = dss_solve_real(handle,opt,B,1,X)
write(*,10)'Solve ',dss_err
10 format(A7,2x,I4)
end program ptmkl
I compile this program with IFort 15.0 IA-32 using the command
ifort /Qmkl /traceback /MD dssbug.f90
When I then run the program repeatedly, it works correctly very often but, once in a while, aborts with a C0000005 or C0000374 error. To track the problem down, I ran the program inside Inspector XE 2015, and the screenshot is attached.
This is a shorter reproducer for the problems reported by another user, see https://software.intel.com/en-us/forums/topic/535430 .