I am using the "direct" calls set by MKL_DIRECT and am moving from MKL 11.2 to MKL 11.3 Update 1
I am finding my code is throwing a "integer divide by zero" exception at this call when using 11.3 Update 1. The "calling" code is well tested and worked fine in MKL 11.2.
If I "turn off" MKL_DIRECT, the code again works as expected.
else if (!AisN && BisN) mkl_dc_gemm_xx_mnk_pst(m, n, k, alpha, A, lda, B, ldb, beta, C, ldc, MKL_DC_MOV, MKL_DC_MOV, MKL_DC_MT, MKL_DC_MN);
I am using Intel Compiler 16.0 Update 1 on Windows x64 ( Visual Studio 2015)
The call is a simple "dgemm'" call as below with m=4,n=4. An "integer divide by 0" exception must be a good clue as to possible issue,
This is a pretty simple regression case for me..
- Used to work in MKL 11.2 with MKL_DIRECT.
- Fails in 11.3 Update 1 MKL_DIRECT.
- Works fine in 11.3 Update 1 when MKL_DIRECT is undefined.
dgemm( &transa, &transb, &m, &n,&k,&alpha, a, &lda, b, &ldb,&beta, c, &ldc );
I tried MKL 11.3.1 direct call on a Linux system (should try on windows next). Although I do not see "integer divide by 0" exception, I do see incorrect results with the 16.0.1 compiler. I get incorrect results with both MKL 11.2.3 and MKL 11.3.1. If I switch to an older compiler (15.0.3), the errors for both MKL builds disappear.
Vasci, if this is easy on your side, could you try MKL 11.3.1 with an 15.0.* compiler to see if you still see an error with MKL 11.3.1? If you confirm that MKL 11.3.1 works fine with an 15.0 compiler, then we can confirm that this is a compiler related issue.
Unfortunately I am stuck with Intel Compiler 16.0 Update 1. I am transitioning to Visual Studio 2015 Update 1, and Intel Compiler 15.0 is language incompatible with the VS 2015 Update 1 STL headers as the STL use some C++ features unsupported by IC 15.0. And IC 15.0 is not going to be updated anymore.
I will try to create a reproducer - at the moment the failure is happening inside a regression test..
@Gennady this is 64-bit
No problem, I thought this may be hard as well. After further investigation, we suspect that this may be related to the -openmp (Linux), /Qopenmp (Windows) compiler flag. If I link with libiomp5md.lib explicitly, I do not see the errors. Similarly, If I link with sequential library where we do not need to pass the openmp flags, I do not see any errors.
We have a patched MKL direct call header file that will work fine with the Intel 16.0 compiler. Please let us know if you are interested in trying this modified header file so that we can send it to you.