<?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 Difference in behaviour when using a singlecustom MKL DLL vs &amp;quot;normal&amp;quot; linking in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769448#M501</link>
    <description>&lt;P&gt;We have a heavily OMP multithreaded tool( Windows/64) that calls MKL 10.3(.11). To avoid "DLL hell" conflicts with other software that can call our code as a DLL ( e.g. matlab) we used the mkl/tools/builder makefiles to create a single/custom MKL DLL/.lib that we link against.&lt;BR /&gt;&lt;BR /&gt;I have been trying to debug a 100% reproducible nasty crash on crtexit ( i.e. after exit(0) has been called). The stack stops with an access violation in the Windows API "HeapFree" called by the MKL DLL. I ran Inspector XE memory check to diagnose this, and could not find any issues.&lt;BR /&gt;&lt;BR /&gt;Yet, I found that if OMP_NUM_THREADS=1, the problem goes away.&lt;BR /&gt;&lt;BR /&gt;Now one would normally blame some nasty threading bug in my code for this, but I used Inspector XE thread check on "max" , but could not find any issue that would be trashing things.&lt;BR /&gt;&lt;BR /&gt;As a last resort, I stopped using our"custom" MKL DLL, and linked against the regular MKL DLLs (mkl_core etc) and the problem disappeared.&lt;BR /&gt;Can anyone think why using a single custom DLL vs using the regular MKL DLL's would show different behaviour? It seems to be related to multi-threading in some way. &lt;BR /&gt;&lt;BR /&gt;The build line for creating the custom DLL was....&lt;BR /&gt;nmake em64t buf_lib= - export=functions_list manifest=embed name=custom_mkl_em64t&lt;/P&gt;</description>
    <pubDate>Fri, 10 Aug 2012 14:46:25 GMT</pubDate>
    <dc:creator>AndrewC</dc:creator>
    <dc:date>2012-08-10T14:46:25Z</dc:date>
    <item>
      <title>Difference in behaviour when using a singlecustom MKL DLL vs "normal" linking</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769448#M501</link>
      <description>&lt;P&gt;We have a heavily OMP multithreaded tool( Windows/64) that calls MKL 10.3(.11). To avoid "DLL hell" conflicts with other software that can call our code as a DLL ( e.g. matlab) we used the mkl/tools/builder makefiles to create a single/custom MKL DLL/.lib that we link against.&lt;BR /&gt;&lt;BR /&gt;I have been trying to debug a 100% reproducible nasty crash on crtexit ( i.e. after exit(0) has been called). The stack stops with an access violation in the Windows API "HeapFree" called by the MKL DLL. I ran Inspector XE memory check to diagnose this, and could not find any issues.&lt;BR /&gt;&lt;BR /&gt;Yet, I found that if OMP_NUM_THREADS=1, the problem goes away.&lt;BR /&gt;&lt;BR /&gt;Now one would normally blame some nasty threading bug in my code for this, but I used Inspector XE thread check on "max" , but could not find any issue that would be trashing things.&lt;BR /&gt;&lt;BR /&gt;As a last resort, I stopped using our"custom" MKL DLL, and linked against the regular MKL DLLs (mkl_core etc) and the problem disappeared.&lt;BR /&gt;Can anyone think why using a single custom DLL vs using the regular MKL DLL's would show different behaviour? It seems to be related to multi-threading in some way. &lt;BR /&gt;&lt;BR /&gt;The build line for creating the custom DLL was....&lt;BR /&gt;nmake em64t buf_lib= - export=functions_list manifest=embed name=custom_mkl_em64t&lt;/P&gt;</description>
      <pubDate>Fri, 10 Aug 2012 14:46:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769448#M501</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2012-08-10T14:46:25Z</dc:date>
    </item>
    <item>
      <title>Difference in behaviour when using a singlecustom MKL DLL vs "n</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769449#M502</link>
      <description>Interestingly, switching back to the version of our custom DLL built from MKL 10.2.6 resolved the issue as well, so this issue seems to have come from changes in 10.3.&lt;BR /&gt;&lt;BR /&gt;I have a wild guess ... on Windows DLL's can do things on DLL_ATTACH and DLL_DETACH when they are loaded and unloaded. Perhaps some of the MKL DLL's allocate/deallocate at these times. Of course, with a custom DLL all this behaviour is lost.</description>
      <pubDate>Fri, 10 Aug 2012 15:52:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769449#M502</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2012-08-10T15:52:30Z</dc:date>
    </item>
    <item>
      <title>Difference in behaviour when using a singlecustom MKL DLL vs "n</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769450#M503</link>
      <description>I have to retract the statement that switching back to 10.2.6 based custom DLL fixed the issue. It reduced the frequency of the issue, but did not eliminate it. &lt;BR /&gt;I have been running &amp;gt;1000 QA tests on a variety of input files and so far the only solution seems to be to switch from the one monolithic custom MKL DLL back to the "as-shipped" MKL DLLs.</description>
      <pubDate>Fri, 10 Aug 2012 22:14:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769450#M503</guid>
      <dc:creator>AndrewC</dc:creator>
      <dc:date>2012-08-10T22:14:17Z</dc:date>
    </item>
    <item>
      <title>Difference in behaviour when using a singlecustom MKL DLL vs "n</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769451#M504</link>
      <description>Hello!&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;could you provide list of used MKL functions?&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Andrey&lt;/DIV&gt;</description>
      <pubDate>Mon, 13 Aug 2012 06:56:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-in-behaviour-when-using-a-singlecustom-MKL-DLL-vs/m-p/769451#M504</guid>
      <dc:creator>Andrey_G_Intel2</dc:creator>
      <dc:date>2012-08-13T06:56:11Z</dc:date>
    </item>
  </channel>
</rss>

