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 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 ?
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.
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.