DGEMM with pgithread is giving segmentation fault

DGEMM with pgithread is giving segmentation fault

Hello, 

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.  

 

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

There was a threading bug in MKL 11.0 update 3. You may have been affected by this bug. Please check your MKL version (e.g. using the mkl_get_version_string function). If it is MKL 11.0 update 3 then please update to the latest version (11.0 update 5).

Otherwise, please provide a simple reproducer. Are you using the PGI Fortran compiler or the PGI C compiler? Which version?

Thanks.

output of mkl_get_sersion is Intel(R) Math Kernel Library Version 11.0.1 Product Build 20121009 for Intel(R) 64 architecture applications  

output of mkl_get_sersion is Intel(R) Math Kernel Library Version 11.0.1 Product Build 20121009 for Intel(R) 64 architecture applications  

The attached files gives similar segfault when MKL_NUM_THREADS set to 8. ( it works fine for 1, 2, .. 7) . It works fine when used with intel_threads .

 

Attachments: 

AttachmentSize
Download mkl-pgi-thread.zip1.04 KB

Thanks Piyush for providing the reproducer. I'll try to take a look at it and get back to you soon.

Leave a Comment

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