Community
cancel
Showing results for 
Search instead for 
Did you mean: 
AndrewC
New Contributor I
49 Views

Thread safety of MKL 10.2

MKL 10.2 is documented as being "thread safe".

I am using Intel Inspector XE 2011 to verify some code that calls MKL in a simplified "OMP" parallel loop, see below, and I am getting getting 'Data Race' errrors inside MKL.

Intel Inspector XE 2011 ( which, BTW, is an incredible tool) complains about a data race condition of two threads writing to the one memory location in daxpy

Write location #1

!daxpy - 0x3ac200
!zlange - 0x10ed43
...

Write location #2

!daxpy - 0x3ac200
!zgetri - 0x102fed


In the sample code below the matrices ktinv and kt are "private" to each thread by definition. That means these matrices and all their data are "thread-local"and the matrix data from one thread is not shared by another thread.


#pragma omp parallel for
for( int i=0;i Matrix ktinv;
Matrix kt(4,4,Complex(0.0,0.0));
kt.diagonal()=Complex(1.0,0.0);
ktinv.reference( inverse(kt) );
}


Any feedback on whether this is just a bogus issue in daxpy
0 Kudos
1 Reply
Murat_G_Intel
Employee
49 Views

Hello,

Thank you for reporting the issue; we will investigate this.

Is it possible for you to provide more information about the CPU and OS for which theInspector reports a race condition? A simple code that reproduces the issue will also greatly help us to quickly get to the bottom of this. Finally, are you using MKL IA32 or Intel64?

Thank you,

-- Efe
Reply