<?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 Run-time errors when running a MEX-compiled dll in Matlab using the MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901705#M11314</link>
    <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I have tried to create a small library which uses parts of the mkl for faster processing. The purpose is that this library is accessible from matlab, so I have made a MEX interface, which allow matlab to create a dll in windows (and something else in linux). I have no problem compiling the code, and get no linker errors. Also, when I use the same code in an example program in C++, it all works fine. But... when I run a part of the code in Matlab that does a call to the MKL library, I get segmentation violation errors.&lt;BR /&gt;&lt;BR /&gt;Basically, I have tried both the vmlSetMode( VML_HA ), and a call to vsSqrt( 5, x, y ). I use MSVC++ 7.1, and does a normal mex call to compile in Matlab. I have tried to compile all the source files in my project and link to the MKL .lib files from matlab, and I have tried to make a static library as well, as well as to a DLL.&lt;BR /&gt;&lt;BR /&gt;I use the MKL library in my project as static linked, which I guess might be causing me the problems. The reason why I want to do this is to reduce the number of files I need to move around for my toolbox to work. Am I doing something wrong when I use it in Matlab as it works fine from another C++ project made by msvc 7.1?&lt;BR /&gt;&lt;BR /&gt;Or is it matlab that does some stupid and removes that part of the project.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Henrik Andresen&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Oct 2007 19:37:55 GMT</pubDate>
    <dc:creator>henrikandr</dc:creator>
    <dc:date>2007-10-16T19:37:55Z</dc:date>
    <item>
      <title>Run-time errors when running a MEX-compiled dll in Matlab using the MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901705#M11314</link>
      <description>Hi all&lt;BR /&gt;&lt;BR /&gt;I have tried to create a small library which uses parts of the mkl for faster processing. The purpose is that this library is accessible from matlab, so I have made a MEX interface, which allow matlab to create a dll in windows (and something else in linux). I have no problem compiling the code, and get no linker errors. Also, when I use the same code in an example program in C++, it all works fine. But... when I run a part of the code in Matlab that does a call to the MKL library, I get segmentation violation errors.&lt;BR /&gt;&lt;BR /&gt;Basically, I have tried both the vmlSetMode( VML_HA ), and a call to vsSqrt( 5, x, y ). I use MSVC++ 7.1, and does a normal mex call to compile in Matlab. I have tried to compile all the source files in my project and link to the MKL .lib files from matlab, and I have tried to make a static library as well, as well as to a DLL.&lt;BR /&gt;&lt;BR /&gt;I use the MKL library in my project as static linked, which I guess might be causing me the problems. The reason why I want to do this is to reduce the number of files I need to move around for my toolbox to work. Am I doing something wrong when I use it in Matlab as it works fine from another C++ project made by msvc 7.1?&lt;BR /&gt;&lt;BR /&gt;Or is it matlab that does some stupid and removes that part of the project.&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;Henrik Andresen&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Oct 2007 19:37:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901705#M11314</guid>
      <dc:creator>henrikandr</dc:creator>
      <dc:date>2007-10-16T19:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Run-time errors when running a MEX-compiled dll in Matlab u</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901706#M11315</link>
      <description>&lt;P&gt;I think what you are trying to use MKL statical library in your DLL. Am I right?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 18 Oct 2007 10:17:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901706#M11315</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2007-10-18T10:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Run-time errors when running a MEX-compiled dll in Matlab u</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901707#M11316</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Both yes and no.&lt;BR /&gt;&lt;BR /&gt;I am trying 2 cases, where both ultimately leads to a dll being formed by Matlab. One case is to compile it directly by matlab, in which case you are correct. The other thing I try is to compile it to my own static linked library, and then use that to create a dll through matlab.&lt;BR /&gt;&lt;BR /&gt;/Henrik&lt;BR /&gt;</description>
      <pubDate>Thu, 18 Oct 2007 13:41:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901707#M11316</guid>
      <dc:creator>henrikandr</dc:creator>
      <dc:date>2007-10-18T13:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Run-time errors when running a MEX-compiled dll in Matlab u</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901708#M11317</link>
      <description>Ok. I think I understand now. It`s incorrect way of MKL usage - to use statical library in dynamical by any ways. If you plan to use your statical library in dinamical, you should link your library with dynamical version of MKL.</description>
      <pubDate>Mon, 22 Oct 2007 07:27:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Run-time-errors-when-running-a-MEX-compiled-dll-in-Matlab-using/m-p/901708#M11317</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2007-10-22T07:27:38Z</dc:date>
    </item>
  </channel>
</rss>

