<?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 Re:MKL concurrency (openMP?) with Visual Studio ppl in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225414#M30285</link>
    <description>&lt;P&gt;yes, it also is applicable to Windows.&lt;/P&gt;&lt;P&gt;and yes, the issue is related to the performance first of all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 04 Nov 2020 11:26:40 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2020-11-04T11:26:40Z</dc:date>
    <item>
      <title>MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1224722#M30272</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;In my C++ applicaiton (Visual Studio 2017, with the MS compiler) I am using MKL extensively. In this particular case I am using&amp;nbsp;cblas_dgemm from mkl.h.&lt;/P&gt;
&lt;P&gt;I am also using the c++ std::thread library for threads doing jobs "on the side", and the Microsoft concurrency::parallel_for for higher level parallelization.&lt;BR /&gt;&lt;BR /&gt;Today I was experimenting with the use of an std::condition_variable for detecting when a job in a detached std::thread has finished. This change caused a the application to hang indefinitely.&lt;/P&gt;
&lt;P&gt;When debugging, the issue appears not related to my new change (i.e. the condition variable) but to intel mkl and&amp;nbsp;cblas_dgemm. This seems weird to me. I do not believe in an issue with cblas_dgemm, or my use of it in this case, as it is a simple 3x3 matrix mulitplication.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Therefore: are there any known issues with combining mkl (openMP?) with the MS threading model (ppl) in the same application?&lt;/P&gt;
&lt;P&gt;I am using Intel Parallel studio XE2018 U4 Pro (with VS integration).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Jens&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 15:22:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1224722#M30272</guid>
      <dc:creator>Jens_E_</dc:creator>
      <dc:date>2020-11-02T15:22:06Z</dc:date>
    </item>
    <item>
      <title>Re: MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1224724#M30273</link>
      <description>&lt;P&gt;Let me also add that my application &lt;STRONG&gt;does not&lt;/STRONG&gt; use Open MP.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am aware of this&amp;nbsp;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mkl-windows-developer-guide/top/linking-your-application-with-the-intel-math-kernel-library/linking-in-detail/linking-with-threading-libraries.html" target="_blank"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mkl-windows-developer-guide/top/linking-your-application-with-the-intel-math-kernel-library/linking-in-detail/linking-with-threading-libraries.html&lt;/A&gt;&amp;nbsp;, but I am not sure if it only means that I cannot use open MP in my application or if it also means that I cannot use any other threading model (i.e. Microsoft PPL/std::thread) in my application&amp;nbsp;(with "any compiler" (MSVS2017) and MKL in parallel mode)&lt;/P&gt;</description>
      <pubDate>Mon, 02 Nov 2020 15:29:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1224724#M30273</guid>
      <dc:creator>Jens_E_</dc:creator>
      <dc:date>2020-11-02T15:29:20Z</dc:date>
    </item>
    <item>
      <title>Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225030#M30277</link>
      <description>&lt;P&gt;Jens, if you could link this case against the sequential version of mkl, then the problem you reported here, will be dissapear. Did you try this option?&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:26:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225030#M30277</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-03T12:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225032#M30278</link>
      <description>I have not tried that exactly, but I have tried to comment out the calls to mkl (cblas_dgemm in particular) and then the problem disappears.&lt;BR /&gt;&lt;BR /&gt;I do wish to keep using pardiso in parallel (another part of the same application), so want to use the parallel version of mkl.&lt;BR /&gt;&lt;BR /&gt;Note that mkl and my own std::thread and concurrency:: code do not work on the same data structures. &lt;BR /&gt;&lt;BR /&gt;However I am concerned that the threading models (open MP and the Microsoft one) somehow still conflict.</description>
      <pubDate>Tue, 03 Nov 2020 12:34:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225032#M30278</guid>
      <dc:creator>Jens_E_</dc:creator>
      <dc:date>2020-11-03T12:34:41Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225042#M30281</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/41889"&gt;@Gennady_F_Intel&lt;/a&gt;&amp;nbsp;Note that I did try&lt;BR /&gt;&lt;BR /&gt;mkl_set_num_threads(1);&lt;/P&gt;
&lt;P&gt;in my application (still using the parallel version of mkl) but before any calls to mkl. This had no effect. I thought this would be equivalent to linking with the sequential version.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:55:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225042#M30281</guid>
      <dc:creator>Jens_E_</dc:creator>
      <dc:date>2020-11-03T12:55:01Z</dc:date>
    </item>
    <item>
      <title>Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225361#M30283</link>
      <description>&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;Yes, setting mkl_set_num_threads(1) before the very first call mkl’s routine is equivalent to linking with sequential versions. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;Check the avoiding conflicts in the multithreaded environment chapter from the MKL Developer Guide follow the link (&lt;/SPAN&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/documentation/mkl-linux-developer-guide/top/managing-performance-and-memory/improving-performance-with-threading/avoiding-conflicts-in-the-execution-environment.html" rel="noopener noreferrer" target="_blank" style="font-family: Arial, sans-serif;"&gt;https://software.intel.com/content/www/us/en/develop/documentation/mkl-linux-developer-guide/top/managing-performance-and-memory/improving-performance-with-threading/avoiding-conflicts-in-the-execution-environment.html&lt;/A&gt;&lt;SPAN style="font-family: Arial, sans-serif;"&gt;). The table considers several cases where conflicts may arise. MKL has to work properly when will call linked against sequential mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Nov 2020 07:51:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225361#M30283</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-04T07:51:36Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225368#M30284</link>
      <description>&lt;P&gt;&lt;a href="https://community.intel.com/t5/user/viewprofilepage/user-id/41889"&gt;@Gennady_F_Intel&lt;/a&gt;&amp;nbsp;thanks - this was useful.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It says Linux on the top - can I assume equivalent guidelines also are applicable to Windows?&lt;/P&gt;
&lt;P&gt;The top row in the table is applicable to my situation. Is the issue related to performance (or possible deadlocks) alone or should I also be concerned about getting invalid results from mkl in that case?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Nov 2020 08:18:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225368#M30284</guid>
      <dc:creator>Jens_E_</dc:creator>
      <dc:date>2020-11-04T08:18:04Z</dc:date>
    </item>
    <item>
      <title>Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225414#M30285</link>
      <description>&lt;P&gt;yes, it also is applicable to Windows.&lt;/P&gt;&lt;P&gt;and yes, the issue is related to the performance first of all.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Nov 2020 11:26:40 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225414#M30285</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-04T11:26:40Z</dc:date>
    </item>
    <item>
      <title>Re:MKL concurrency (openMP?) with Visual Studio ppl</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225433#M30286</link>
      <description>&lt;P&gt;This issue has been resolved and we will no longer respond to this thread.&amp;nbsp;If you require additional assistance from Intel, please start a new thread.&amp;nbsp;Any further interaction in this thread will be considered community only.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 Nov 2020 13:17:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-concurrency-openMP-with-Visual-Studio-ppl/m-p/1225433#M30286</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-11-04T13:17:03Z</dc:date>
    </item>
  </channel>
</rss>

