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

possible bug in 18.0.2 mkl

may_ka
Beginner
329 Views

Hi there,

the following code yield as segfault at run time:

Program Test
  use lapack95
  Implicit none
  Real*8, allocatable :: x(:,:)
  Integer*8 :: ISError
  if(allocated(x)) Then
    call DPOTRF_F95(A=x,UPLO="U",INFO=ISError)
  End if
End Program Test

compier  flags were:

ifort -i8 -warn nounused -warn declarations -O0 -check all -warn interface -check noarg_temp_created -static -c -o NoOMP_MKLSEQ_ifort_4.16.12-1-ARCH/Test.o Test.f90 -I /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/include/intel64/ilp64

linker flags were:

ifort -i8 -warn nounused -warn declarations -O0 -check all -warn interface -check noarg_temp_created -static -o Test_NoOMP_MKLSEQ_4.16.12-1-ARCH NoOMP_MKLSEQ_ifort_4.16.12-1-ARCH/Test.o    /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_blas95_ilp64.a /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_lapack95_ilp64.a -Wl,--start-group /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_intel_ilp64.a /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_core.a /opt/intel/compilers_and_libraries_2018.2.199/linux/mkl/lib/intel64/libmkl_sequential.a -Wl,--end-group -lpthread -lm -ldl

runtime output  were:

user@linux:~/./Test_NoOMP_MKLSEQ_4.16.12-1-ARCH
Segmentation fault (core dumped)

ifort parallel studio version: 18.0.2, linux kernel: 4.16.12

Does run in 17.07.

Is this a bug and if yes is that fixed in 18.0.3??

Thanks

Cheers

Karl

0 Kudos
7 Replies
may_ka
Beginner
329 Views

Update:

Just installed 18.0.3

stlll the same problem.

0 Kudos
Gennady_F_Intel
Moderator
329 Views

Thanks for the report we will check the problem. But looking at your example, I see potrf routine has not been called at all because of the array X is not allocated. What do check then?  It seems you need to allocate and initialize the input X(:,:)  array, isn't ?

0 Kudos
may_ka
Beginner
329 Views

Hi Gennady,

thanks for the response.

The fact that mkl lapack is not called at all makes it even more wired. The program crashes immediately when started. Only when the mkl lapack call is commented out it works. I have no idea whats going on. Thats why I reported thet compiler and linker flags as well.

Hope that helps.

Cheers

0 Kudos
may_ka
Beginner
329 Views

Hi Gennady,

the problem seems to be limited to the sequential version of mkl. When linking to the threaded version, its running.

cheers

0 Kudos
may_ka
Beginner
329 Views

I am wondering what has happend to this. I initiated a support ticket which went asleep. I tested 19.02 today and the bug seems to be still not fixed!!

0 Kudos
Kirill_V_Intel
Employee
329 Views

Hello Karl,

AFAIK, this issue is related to linking with -static in combination with -lpthread (you find a lot information if you search for something like "static pthread segfault") and thus it is not a problem of the MKL. The known fix is to add to your link line the following:
-Wl,--whole-archive -lpthread -Wl,--no-whole-archive

Let me know if this doesn't work for you.

Best,
Kirill

0 Kudos
may_ka
Beginner
329 Views

Thanks

0 Kudos
Reply