I'm new to Magma and I'm trying to use it in Matlab via a mex-files, but I ran into some troubles with it.
First of all, as far as I can tell everything is installed correctly (on a 64bit Linux machine) and all the tests and examples that come with Magma run fine. Also, when I put together some simple tests in C++ (i.e. creating random complex matrices and calcuting the eigenvalues with magma_zgeev) everything works. However, if I try to do the same test in a mex-file, Matlab completely crashes with a segmentation violation at the point where the mex-file calls magma_zgeev. Here's the stack trace:
Code: Select all
Stack Trace (from fault):
[ 0] 0x00007f7f867b02fb /opt/intel/mkl/lib/intel64/libmkl_avx2.so+10638075 mkl_lapack_ps_avx2_xzlange+00000187
[ 1] 0x00007f7f64eda080 /usr/local/MATLAB/R2014b/bin/glnxa64/mkl.so+03129472 mkl_lapack_ps_xzlange+00000224
[ 2] 0x00007f7f64d6280d /usr/local/MATLAB/R2014b/bin/glnxa64/mkl.so+01591309 mkl_lapack_zlange+00001821
[ 3] 0x00007f8035e1a623 /usr/local/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00558627 __kmp_invoke_microtask+00000147
[ 4] 0x00007f8035df2f64 /usr/local/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00397156
[ 5] 0x00007f8035df1e02 /usr/local/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00392706
[ 6] 0x00007f8035e1a8d9 /usr/local/MATLAB/R2014b/bin/glnxa64/../../sys/os/glnxa64/libiomp5.so+00559321
[ 7] 0x00007f80492f90a4 /lib64/libpthread.so.0+00032932
[ 8] 0x00007f804902e02d /lib64/libc.so.6+00938029 clone+00000109
So is there some proper way to avoid such conflicts of the libraries when using Magma in Matlab?
Best regards,
Jens