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

Access violation from MKL

Chao_Z_1
Beginner
463 Views

Hi, all:

I built up a project based on Armadillo(6.500.5) and MKL(11.x). The project was built as a mex file that can be called by MATLAB (2015a).

When the pinv/svd routine in Armadillo was called for the first time in MATLAB, it ran OK and produced right result. However, when I ran "clear functions" in MATLAB and re-built my project in MS Visual Studio 2013, then re-ran the mex file in MATLAB, access violation was reported from MKL:

------------------------------------------------------------------------
          Access violation detected at Thu May 19 19:17:18 2016
------------------------------------------------------------------------

Configuration:
  Crash Decoding      : Disabled
  Crash Mode          : continue (default)
  Current Graphics Driver: Unknown hardware 
  Default Encoding    : GBK
  Graphics card 1     : NVIDIA ( 0x10de ) NVIDIA GeForce GT 610  Version 9.18.13.4448
  Host Name           : NCVX91E3RJRG67J
  MATLAB Architecture : win64
  MATLAB Root         : D:\MATLAB\MATLAB Production Server\R2015a
  MATLAB Version      : 8.5.0.197613 (R2015a)
  OpenGL              : hardware
  Operating System    : Microsoft Windows 7 旗舰版 
  Processor ID        : x86 Family 6 Model 62 Stepping 4, GenuineIntel
  Virtual Machine     : Java 1.7.0_60-b19 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
  Window System       : Version 6.1 (Build 7601: Service Pack 1)

Fault Count: 1


Abnormal termination:
Access violation

Register State (from fault):
  RAX = 000007fee2bd2d70  RBX = 0000000004026c00
  RCX = 000007fee09c8ff8  RDX = 0000000004026c00
  RSP = 00000000040261f8  RBP = 000007fee09c8ff8
  RSI = 0000000004026ae0  RDI = 0000000000000000
 
   R8 = 0000000004026c08   R9 = 0000000004026e90
  R10 = 0000000004026c10  R11 = 0000000004026ae0
  R12 = 0000000004026c00  R13 = 0000000004026f00
  R14 = 0000000004026c08  R15 = 0000000004026e90
 
  RIP = 000007fee2bd2d70  EFL = 00010202
 
   CS = 0033   FS = 0053   GS = 002b

Stack Trace (from fault):
[  0] 0x000007fee2bd2d70                                   <unknown-module>+00000000
[  1] 0x000007fee04ee066 C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\redist\intel64_win\mkl\mkl_core.dll+16769126 mkl_lapack_zlaswp+00007510
[  2] 0x000007fedf843566 C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.3.207\windows\redist\intel64_win\mkl\mkl_core.dll+03487078 mkl_lapack_cgesvd+00006486
[  3] 0x000007feec027efb              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00032507 cgesvd+00000523
[  4] 0x000007feec07f73c              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00390972 arma::lapack::cx_gesvd<float>+00000252
[  5] 0x000007feec098098              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00491672 arma::auxlib::svd_econ<float,arma::Mat<std::complex<float> > >+00001704
[  6] 0x000007feec057466              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00226406 arma::op_pinv::apply<arma::Mat<std::complex<float> > >+00000758
[  7] 0x000007feec03f1a5              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00127397 arma::Mat<std::complex<float> >::operator=<arma::Mat<std::complex<float> >,arma::op_pinv>+00000069
[  8] 0x000007feec03a3b6              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00107446 Compute_Matrix+00001190
[  9] 0x000007feec0b33e8              D:\Project\FATQ\x64\Debug\FATQ.mexw64+00603112 mexFunction+00002440

 

Here if I turn off "MKL" in Visual Studio, and use lapack/blas library from CLAPACK, the whole program was OK.

 

Any idea on this problem?

Thanks!

 

 

 

 

 

0 Kudos
1 Reply
Gennady_F_Intel
Moderator
463 Views

You may probably try to use another version of MKL, as we had the problem with SVD in the past. The current version of MKL is 2020 and available for download. 

0 Kudos
Reply