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

segfault when using heevr from lapack95

jakub_z_
Beginner
262 Views

'm trying to use the heevr routine from lapack95 in fortran, but I'm getting segfault. I'm using the parallel studio xe 2016 composer edition for fortran update3. Here is a sample code, which shows the problem:

program test
use lapack95
implicit none

integer, parameter:: dp=kind(0.d0)

complex(dp), allocatable :: A(:,:)
real(dp), allocatable :: w(:)
integer :: n

n=20
allocate(A(n,n))
allocate(w(n))
A(:,:) = 0_dp

call heevr(A,w)

end program

I use the following command to compile: 

ifort test.f90 -heap-arrays  -check all -warn all -g -traceback -I${MKLROOT}/include/intel64/lp64 -I${MKLROOT}/include  ${MKLROOT}/lib/intel64/libmkl_lapack95_lp64.a -Wl,--start-group ${MKLROOT}/lib/intel64/libmkl_intel_lp64.a ${MKLROOT}/lib/intel64/libmkl_core.a ${MKLROOT}/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl -o test.x

It complies fine, but when I run it a segmentation fault occurs:

forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source             
test.x             0000000000C404E6  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown
test.x             0000000000C3FBEF  Unknown               Unknown  Unknown
libpthread.so.0    00007FC2936BA3D0  Unknown               Unknown  Unknown

The segmentation fault does not occur if n<11 or if I use heevd instead of heevr. The stack size is set to unlimited.

0 Kudos
0 Replies
Reply