I have created a small case that demonstrates that MKL crashes when used from MATLAB.
The MATLAB mex file should be created using MATLAB r2013a on linux64x86. The key is if the mex file, which is a shared object, is linked with libiomp5 then MKL crashes. If the mex file is linked without it works fine. You can reproduce the crash as follows
- Edit buildomp.sh i.e. adjust paths.
- sh buildomp.sh
- MATLAB should crash now.
Try it again but remove -liomp5 in buildomp.sh.
Why does it crash when libiomp5 is linked into the mex file?
The system does not allow me to attached the needed files on this post but will try in the reply.