Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

Matlab crashes when invoking functions from intel MKL

$
0
0

I'm trying to link Fortran code with Matlab using the Mex function. I can successfully compile and link the code using the following instruction:

mex COMPFLAGS="$COMPFLAGS -Qopenmp -Qmkl"...
'-IC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include'...
'-LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64'...
ero_dep_fortran.F Module.F prepare_bank_collapse.F LINEAR_ELASTIC_STIFFNESS.F FAILURE_CRITERION.F OUTPUT.F pardisonew.F

However, when I execute the generated .mexw64 function, Matlab crashes without any error information. Then I debug my Fortran code line by line, and I found that Matlab crashes when invoking the function pardiso which comes from Intel MKL library. It seems that when invoking function from MKL, Matlab will crash and I have no idea how to fix it.

I also try to run the code on the Intel Parallel Studio XE 2017 compiler using makefile as:

ifort Module.F OUTPUT.F FAILURE_CRITERION.F pardisonew.F LINEAR_ELASTIC_STIFFNESS.F prepare_bank_collapse.F ero_dep_fortran.F /Qopenmp /Qmkl /nostandard-realloc-lhs /MD -o BANK_COLLAPSE.exe

The generated .exe works. So the problem is not due to the code self or the function pardiso from Intel MKL library. Maybe there are some conflicts between Matlab mkl and intel mkl?

I use Matlab 2019b and Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015 to compile and link the code. 

I use windows 10 system and the version of compiler and library is 2017.5.267

Any suggestions will be appreciated.

TCE Open Date: 

Saturday, December 28, 2019 - 02:17

Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>