<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Help with Matlab C-mex integration in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-Matlab-C-mex-integration/m-p/847511#M6342</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm a PhD-Student doing some simulations with Matlab. I hope to improve the performance of some critical parts by using Intel MKL (Lapack), therefore I downloaded version 9.1.&lt;BR /&gt;I use ICC as compiler (v. 10.0) and Matlab 7.2.0, my system is a Core2Duo with OpenSuse Linux 10.2, kernel 2.6.18.8 bigsmp.&lt;BR /&gt;In order to set up the system, I successfullly compiled the yprime.c example with mex using icc.&lt;BR /&gt;To test the MKL, I added &lt;BR /&gt;#include "mkl.h" &lt;BR /&gt;to the source file and linked against necessary libs. There was no problem linking it against mkl_ia32. Whenever I additionally link against mkl_lapack, I get an error at run-time that says:&lt;BR /&gt;&lt;BR /&gt;/opt/intel/mkl/9.1/lib/32/libmkl_lapack.so: undefined symbol: dptts2.&lt;BR /&gt;&lt;BR /&gt;This is what matlab does in order to get the .mex-File:&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -c -I/usr/local/matlab/extern/include -I/usr/local/matlab/simulink/include -DMATLAB_MEX_FILE -I/opt/intel/mkl/9.1/include -fPIC -pthread -O2 -parallel -axT -xT yprime.c&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -c -I/usr/local/matlab/extern/include -I/usr/local/matlab/simulink/include -DMATLAB_MEX_FILE -I/opt/intel/mkl/9.1/include -fPIC -pthread -O2 -parallel -axT -xT /usr/local/matlab/extern/src/mexversion.c&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -axT -xT -pthread -shared -Wl,--version-script,/usr/local/matlab/extern/lib/glnx86/mexFunction.map -o yprime.mexglx yprime.o mexversion.o -Wl,-rpath-link,/usr/local/matlab/bin/glnx86 -L/opt/intel/mkl/9.1/lib/32 -L/usr/local/matlab/bin/glnx86 -I/opt/intel/mkl/9.1/include -lmx -lmex -lmat -lmkl_lapack -lmkl_ia32 -lm&lt;BR /&gt;&lt;BR /&gt;Before my experiments with Matlab I successfully built a plain C/MKL-program using the following:&lt;BR /&gt;&lt;BR /&gt;Invoking: Compiler&lt;BR /&gt;icc -O3 -parallel -I/opt/intel/mkl/9.1/include -openmp-report1 -par-report3 -vec-report5 -axT -xT -MMD -MP -MF"hello.d" -MT"hello.d" -c -o "hello.o" "../hello.c"&lt;BR /&gt;&lt;BR /&gt;Invoking: Linker&lt;BR /&gt;icc -axT -xT -L/opt/intel/mkl/9.1/lib/32 -o"hello_world" ./hello.o -lmkl_lapack -lmkl_ia32&lt;BR /&gt;&lt;BR /&gt;I can run hello_world withoug any problems!&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;BR /&gt;&lt;BR /&gt;Christian &lt;BR /&gt;</description>
    <pubDate>Wed, 04 Jul 2007 11:13:51 GMT</pubDate>
    <dc:creator>Deleted_U_Intel</dc:creator>
    <dc:date>2007-07-04T11:13:51Z</dc:date>
    <item>
      <title>Help with Matlab C-mex integration</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-Matlab-C-mex-integration/m-p/847511#M6342</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I'm a PhD-Student doing some simulations with Matlab. I hope to improve the performance of some critical parts by using Intel MKL (Lapack), therefore I downloaded version 9.1.&lt;BR /&gt;I use ICC as compiler (v. 10.0) and Matlab 7.2.0, my system is a Core2Duo with OpenSuse Linux 10.2, kernel 2.6.18.8 bigsmp.&lt;BR /&gt;In order to set up the system, I successfullly compiled the yprime.c example with mex using icc.&lt;BR /&gt;To test the MKL, I added &lt;BR /&gt;#include "mkl.h" &lt;BR /&gt;to the source file and linked against necessary libs. There was no problem linking it against mkl_ia32. Whenever I additionally link against mkl_lapack, I get an error at run-time that says:&lt;BR /&gt;&lt;BR /&gt;/opt/intel/mkl/9.1/lib/32/libmkl_lapack.so: undefined symbol: dptts2.&lt;BR /&gt;&lt;BR /&gt;This is what matlab does in order to get the .mex-File:&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -c -I/usr/local/matlab/extern/include -I/usr/local/matlab/simulink/include -DMATLAB_MEX_FILE -I/opt/intel/mkl/9.1/include -fPIC -pthread -O2 -parallel -axT -xT yprime.c&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -c -I/usr/local/matlab/extern/include -I/usr/local/matlab/simulink/include -DMATLAB_MEX_FILE -I/opt/intel/mkl/9.1/include -fPIC -pthread -O2 -parallel -axT -xT /usr/local/matlab/extern/src/mexversion.c&lt;BR /&gt;&lt;BR /&gt;-&amp;gt; icc -axT -xT -pthread -shared -Wl,--version-script,/usr/local/matlab/extern/lib/glnx86/mexFunction.map -o yprime.mexglx yprime.o mexversion.o -Wl,-rpath-link,/usr/local/matlab/bin/glnx86 -L/opt/intel/mkl/9.1/lib/32 -L/usr/local/matlab/bin/glnx86 -I/opt/intel/mkl/9.1/include -lmx -lmex -lmat -lmkl_lapack -lmkl_ia32 -lm&lt;BR /&gt;&lt;BR /&gt;Before my experiments with Matlab I successfully built a plain C/MKL-program using the following:&lt;BR /&gt;&lt;BR /&gt;Invoking: Compiler&lt;BR /&gt;icc -O3 -parallel -I/opt/intel/mkl/9.1/include -openmp-report1 -par-report3 -vec-report5 -axT -xT -MMD -MP -MF"hello.d" -MT"hello.d" -c -o "hello.o" "../hello.c"&lt;BR /&gt;&lt;BR /&gt;Invoking: Linker&lt;BR /&gt;icc -axT -xT -L/opt/intel/mkl/9.1/lib/32 -o"hello_world" ./hello.o -lmkl_lapack -lmkl_ia32&lt;BR /&gt;&lt;BR /&gt;I can run hello_world withoug any problems!&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;BR /&gt;&lt;BR /&gt;Christian &lt;BR /&gt;</description>
      <pubDate>Wed, 04 Jul 2007 11:13:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-Matlab-C-mex-integration/m-p/847511#M6342</guid>
      <dc:creator>Deleted_U_Intel</dc:creator>
      <dc:date>2007-07-04T11:13:51Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Matlab C-mex integration</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-Matlab-C-mex-integration/m-p/847512#M6343</link>
      <description>&lt;P&gt;Hi, Christian!&lt;/P&gt;
&lt;P&gt;The my simplest testcase didn't show any issues. I've called the lapack function dptrfs() which uses DPTTS2. And I didn't see linkage error. Both static and dynamic MKL libraries have this entry point.&lt;/P&gt;
&lt;P&gt;Please, which lapack-functions are you using? I don't need the real code, only the functions names.&lt;/P&gt;
&lt;P&gt;Vladimir,&lt;BR /&gt;MKL library engineering.&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Jul 2007 13:08:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Help-with-Matlab-C-mex-integration/m-p/847512#M6343</guid>
      <dc:creator>Vladimir_Lunev</dc:creator>
      <dc:date>2007-07-19T13:08:47Z</dc:date>
    </item>
  </channel>
</rss>

