Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

11.3 Update 1 integer divide by zero when using MKL_DIRECT

AndrewC
새로운 기여자 III
1,898 조회수

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);

 

0 포인트
15 응답
Murat_G_Intel
직원
1,898 조회수

Hello,

Could you please send the *GEMM call in your code that causes this exception? Also, which compiler version are you using?

Thank you,

Efe

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

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 );

 

 

0 포인트
Gennady_F_Intel
중재자
1,897 조회수

is that 32 or 64 bit?

0 포인트
Murat_G_Intel
직원
1,898 조회수

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. 

Thank you,

Efe

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

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

0 포인트
Murat_G_Intel
직원
1,898 조회수

Hi Vasci,

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.

Thank you,

Efe

0 포인트
Gennady_F_Intel
중재자
1,898 조회수

the problem is escalated. We will keep you updated when the fix of the problem will be available. 

0 포인트
Murat_G_Intel
직원
1,898 조회수

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. 

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

Yes, I am interested in this patch. I replied to another e-mail re this, and it went to a black hole.

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

Has this been issue been corrected in the just released  Parallel Studio 2016 Update 3?

0 포인트
Murat_G_Intel
직원
1,898 조회수

Yes, it should be fixed in Update 3. It was fixed in MKL 11.3.3 release.

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

OK, great. The fix did not seem to be mentioned in the release notes for Update 3.

0 포인트
Gennady_F_Intel
중재자
1,898 조회수
Andrew, yes, the problem has been fixed into the latest update 3 ( MKL v. 11.3 ). I will update the corresponding bug fix list article asap.
0 포인트
Gennady_F_Intel
중재자
1,898 조회수

btw Andrew, have you already tried how it works with MKL 11.3 update 3?

0 포인트
AndrewC
새로운 기여자 III
1,898 조회수

Not yet, just downloaded the full XE 2016 package and will try it out as soon as feasible.

0 포인트
응답