Problem with DGEMM - ILP interface

Problem with DGEMM - ILP interface


I am getting a SIGSEGV Segmentation fault with dgemm.
Here`s a snippet of my code:

subroutine hostgemm(M,LD, A,B,C,alpha)

Implicit none
integer sizeof_real,sizeof_real8
parameter (sizeof_real=4)
parameter (sizeof_real8=8)
Real*8 A(*),B(*),C(*)
Real*8 alpha,beta, one
Integer :: M, LD, MM
#ifdef LAPACK_I4
Integer*4 :: MI,LDI
Integer*8 :: MI,LDI

MI = M
one =1.0d0
!alpha =1.0d0
beta = 0.0d0

write(*,*)'Into dgemm'
call dgemm('n','n',MI,MI,MI,1.0d0,A,LDI,B,LDI,0.0d0,C,LDI)
c call dgemm('n','n',M,M,M,1.0d0,A,LD,B,LD,0.0d0,C,LD)


$(FC0) $(DEBUGFLAGS) -DMKL_ILP64 -fdefault-integer-8 -m64 -I$(MKLROOT)/include -o lvnopt.exe $(OBJLVN) $(NUTIL) $(BLAS) liblvn.a -L$(MKLROOT)/lib/intel64 -lmkl_gf_ilp64 -lmkl_gnu_thread -lmkl_core -fopenmp -lpthread -lm -L$(CUDADIR)/lib64 -lcublas -lcuda -lcudart -lm

I have tried both 32 and 64 bit integer with LP and ILP interfaces and get the same segmentation fault.
Here`s the result from debugger

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0x4160a940 (LWP 24254)]
0x00002aaab3b9c3a0 in mkl_blas_dgemm_mscale () from /opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/
(gdb) info s
#0 0x00002aaab3b9c3a0 in mkl_blas_dgemm_mscale () from /opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/
#1 0x00002aaaabda6995 in mkl_blas_dgemm_mscale () from /opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/
#2 0x00002aaaab324242 in mkl_blas_dgemm.omp_fn.0 () from /opt/intel/composer_xe_2011_sp1.8.273/mkl/lib/intel64/
#3 0x00002aaab363af52 in ?? () from /usr/lib64/
#4 0x0000003ea580673d in start_thread () from /lib64/
#5 0x0000003ea4cd44bd in clone () from /lib64/

Note: I have to use ILP interface as I have matrices more than 2^31 - 1, the largest that can be run with LP interface.
Any help wil be really appreciated.

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


The probelm has been resolved!
C wrappers with MKL_INT variable declarations was a quick fix. Now the code runs for both LP and ILP interface.

Leave a Comment

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