<?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 Static linking a multi-threaded mex file in Matlab - Getting de in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817911#M4448</link>
    <description>Hi Andrey&lt;BR /&gt;
&lt;BR /&gt;
Both the other libraries work fine. Only the libguide40.lib is creating this error. &lt;BR /&gt;&lt;BR /&gt;So which library should I use? I will mostly be doing LU decomposition, and some transcendental functions calculation. From your reply, I guess you prefer the libiomp5mt. Will it make any difference to me?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Henrik&lt;BR /&gt;</description>
    <pubDate>Fri, 24 Sep 2010 13:33:13 GMT</pubDate>
    <dc:creator>hareson</dc:creator>
    <dc:date>2010-09-24T13:33:13Z</dc:date>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting dependency error</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817906#M4443</link>
      <description>Hi All&lt;BR /&gt;&lt;BR /&gt;I'm
 trying to build a mex file using the MKL, which allows for 
multi-threading and is statically linked. I use the following libraries:&lt;BR /&gt;&lt;BR /&gt;'mkl_intel_lp64', 'mkl_intel_thread', 'mkl_core', and 'libguide40' (The libguide40 can be omitted without linking error though).&lt;BR /&gt;&lt;BR /&gt;But
 when I run a simple vdCos command, I get a "Invalid mex-file: The 
specified module could not be found." error. This states that a dll is 
not present, but I tried doing static linking.... so I'm confused :)&lt;BR /&gt;&lt;BR /&gt;If
 I try a single-threaded link using the libraries 'mkl_intel_lp64', 
'mkl_sequential', and 'mkl_core', Everything works fine ( I can 
calculate a cos-value anyway). Hence... it is the threading stuff that 
creates the linking error.&lt;BR /&gt;&lt;BR /&gt;Is this working as intended, or am I doing something wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;Henrik Andresen&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Sep 2010 11:44:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817906#M4443</guid>
      <dc:creator>hareson</dc:creator>
      <dc:date>2010-09-24T11:44:26Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817907#M4444</link>
      <description>Hello Henrik!&lt;BR /&gt;&lt;BR /&gt;could you specify whichOS and MKL version do you use? Link line will be useful also.&lt;BR /&gt;&lt;BR /&gt;Andrey&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Sep 2010 12:31:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817907#M4444</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2010-09-24T12:31:15Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817908#M4445</link>
      <description>Hi Andrey&lt;BR /&gt;&lt;BR /&gt;Thank you for your response&lt;BR /&gt;&lt;BR /&gt;OS: Windows 7 64-bit&lt;BR /&gt;Matlab: R2010b, 64-bit&lt;BR /&gt;Compiler: Microsoft Visual C++ Express 2008&lt;BR /&gt;MKL Version: 10.2.6.037&lt;BR /&gt;&lt;BR /&gt;Since I'm linking through Matlab, the compiler gets called using the 'mex' command. The next parameter is the cpp file. Rest is:&lt;BR /&gt;&lt;BR /&gt;-I = include path&lt;BR /&gt;-L = library path&lt;BR /&gt;-l = library to include (lower case L)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;I am currently using this line:&lt;/B&gt;&lt;BR /&gt;&lt;BR /&gt;mex mklLibrary.cpp -I"C:\Program Files\Intel\MKL\10.2.6.037\include" -L"C:\Program Files\Intel\MKL\10.2.6.037\em64t\lib" -lmkl_intel_lp64 -lmkl_sequential -lmkl_core&lt;BR /&gt;&lt;BR /&gt;Which works to the point that I can call cblas_scopy(). Haven't tried anything else.&lt;BR /&gt;&lt;BR /&gt;&lt;B&gt;If I do this:&lt;/B&gt;&lt;BR /&gt;mex mklLibrary.cpp -I"C:\Program Files\Intel\MKL\10.2.6.037\include" -L"C:\Program Files\Intel\MKL\10.2.6.037\em64t\lib" -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -llibguide40&lt;BR /&gt;&lt;BR /&gt;I get the dependency error: "??? Invalid MEX-file 'D:\Udvikling\Matlab\performance\mklMex\mklLibrary.mexw64': The specified module could not be found."&lt;BR /&gt;&lt;BR /&gt;If I then copy the file 'libguide40.dll' to the same library as my .mexw64 file, it works fine again.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I hope this helps figuring out what is going on. &lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Henrik&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Sep 2010 13:10:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817908#M4445</guid>
      <dc:creator>hareson</dc:creator>
      <dc:date>2010-09-24T13:10:15Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817909#M4446</link>
      <description>Did you have difficulty when using libiomp5mt rather than libguide40? When using a static OpenMP library, you must take care that it is the only OpenMP library linked, and that it is linked subsequent to all .obj which introduce dependencies. Given that you have VC Express, vcomp shouldn't be getting in the way. If you had any OpenMP references from VC, libiomp5 would take care of them, while libguide would not, but that is not the only reason for preferring the libiomp.</description>
      <pubDate>Fri, 24 Sep 2010 13:26:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817909#M4446</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-09-24T13:26:04Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817910#M4447</link>
      <description>Henrik,&lt;BR /&gt;&lt;BR /&gt;try to use libguide.lib or libiomp5mt.lib instead libguide40.lib.&lt;BR /&gt;&lt;BR /&gt;Andrey</description>
      <pubDate>Fri, 24 Sep 2010 13:28:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817910#M4447</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2010-09-24T13:28:09Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817911#M4448</link>
      <description>Hi Andrey&lt;BR /&gt;
&lt;BR /&gt;
Both the other libraries work fine. Only the libguide40.lib is creating this error. &lt;BR /&gt;&lt;BR /&gt;So which library should I use? I will mostly be doing LU decomposition, and some transcendental functions calculation. From your reply, I guess you prefer the libiomp5mt. Will it make any difference to me?&lt;BR /&gt;&lt;BR /&gt;Cheers&lt;BR /&gt;&lt;BR /&gt;Henrik&lt;BR /&gt;</description>
      <pubDate>Fri, 24 Sep 2010 13:33:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817911#M4448</guid>
      <dc:creator>hareson</dc:creator>
      <dc:date>2010-09-24T13:33:13Z</dc:date>
    </item>
    <item>
      <title>Static linking a multi-threaded mex file in Matlab - Getting de</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817912#M4449</link>
      <description>Henrik,&lt;BR /&gt;&lt;BR /&gt;it is no diferences for you which library to use libguide or libiomp5. These libraries contains OpenMP stuff and only difference between them is version of this stuff. I recommend to use libiomp5 library because it is newer than libguide.&lt;BR /&gt;&lt;BR /&gt;Andrey</description>
      <pubDate>Fri, 24 Sep 2010 13:44:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Static-linking-a-multi-threaded-mex-file-in-Matlab-Getting/m-p/817912#M4449</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2010-09-24T13:44:03Z</dc:date>
    </item>
  </channel>
</rss>

