DGEMM with pgithread is giving segmentation fault

DGEMM with pgithread is giving segmentation fault


My code uses multithreaded MKL dgemm. I use following to link the code 

-L$(MKL_LIBDIR) -lmkl_intel_lp64 -lmkl_pgi_thread -lmkl_core -L/usr/common/usg/intel/lib/intel64 -lpthread -lm -pgf90libs

The code for some reasons give segmentation at some calls to DGEMM. I ran gdb this is output of backtrace

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x43c08940 (LWP 30503)]
0x00002aaaf7ee7df5 in mkl_blas_mc3_dgemm_copyan ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_mc3.so
(gdb) bt
#0 0x00002aaaf7ee7df5 in mkl_blas_mc3_dgemm_copyan ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_mc3.so
#1 0x00002aaaab4ccef2 in mkl_blas_dgemm_2d_acopy_n ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_pgi_thread.so
#2 0x00002aaaab4c9a75 in gemm_host ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_pgi_thread.so
#3 0x00002aaaab4c8951 in mkl_blas_dgemm ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_pgi_thread.so
#4 0x00002aaaaada7799 in dgemm_ ()
from /usr/common/usg/intel/13.0.028/composer_xe_2013.1.117/mkl/lib/intel64/libmkl_intel_lp64.so
#5 0x000000000045c6ef in my_dgemm_ (a=0x519863 "N", b=0x519863 "N", c=0x7fffffffad64,
d=0x7fffffffad48, e=0x7fffffffad98, f=0x7fffffffaeb0, g=0x59b5fd0, h=0x7fffffffad40,
i=0x2aaaf6db5010, j=0x7fffffffad98, k=0x7fffffffaea8, l=0x2aaac72c4010, m=0x7fffffffad64, n=1,
o=1) at ./pdgstrf.c:165

I ran this code on dual socket xeon 5550 2.67GHz system. The code doesn't give segfault until  MKL_NUM_THREADS is set to 1, 2, 3, ..7, but for 8 it does.  


7 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

You may be hitting stack limit, if you didn't set

ulimit -s unlimited  #bash et al

limit stacksize unlimited #tcsh et al

It doesn't work :( . Following is the output for command limit 

cputime unlimited
filesize unlimited
datasize unlimited
stacksize unlimited
coredumpsize 0 kbytes
memoryuse unlimited
vmemoryuse 41943040 kbytes
descriptors 8960
memorylocked unlimited
maxproc 409600

I would also like ot mention that, when linking if I use intel_thread it works alright, i.e. instead of above linking, I link mkl as follows

BLASLIB = -L$(MKL_LIBDIR) -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -L/usr/common/usg/intel/lib/intel64 -liomp5 -lpthread -lm

The segmentation fault doesn't occur. I intend to use openmp (with pg c compiler and MKL multithreaded)  hence, even though this option works I can't use it  

please give us the standalone example of this case.

 I'm attaching this example which also gives segementation fault when MKL_NUM_THREAD is set to 8 (otherwise it works fine).  


Downloadapplication/zip mkl-pgi-thread.zip1.04 KB

ok, there are pgi compiler avalable right now - what version of this compiler do you use?

I use pgcc 12.9-0 64-bit (on linux)

Leave a Comment

Please sign in to add a comment. Not a member? Join today