Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Beginner
6 Views

SEGFAULT during call to DPOSV from MKL library

Hello,

I am compiling and running the following code:

program bug
      implicit none
      INCLUDE 'mkl.fi'
      integer*4, parameter :: Npart=25
      real(kind=8) :: u(1:Npart), lapackab(1:Npart,1:Npart)
      integer*4 :: i, j

      u=0.2d0
      lapackab=0d0
      do i=1,Npart
          lapackab(i,i)=2d0
      enddo

      call DPOSV('L',Npart,1,lapackab,Npart,u,Npart,i)
      write(*,*) "i=",i
end program

For some reason that I cannot really understand, it dies on segmentation fault during the call to DPOSV.

I compile it using the following command (ifort 2016, MKL 11.3):

ifort -O3 -openmp bug.f90 -o run -I/opt/share/INTEL/mkl/include -L/opt/share/INTEL/mkl/lib/intel64/ -lmkl_intel_ilp64 -lmkl_intel_thread -lmkl_core -liomp5 -lpthread -lm -ldl

and I get the same error both using -O3 and -O0 -g. NOTE: with Lapack 3.6.1, it works. I cannot really understand the origin of this error, do you have any clue?

Thank you.

EDIT: I got a nice hint. Basically, I was linking the mkl_intel_ilp64 library while using 4 bits integers. I just changed library to mkl_intel_lp64 and the problem is gone.

 

0 Kudos