<?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 threading problem in MKL in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813247#M4074</link>
    <description>Hi, m&lt;SPAN style="font-family: verdana, sans-serif;"&gt;y 2 cents in addition to the previous comments.&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Yes, it's correct that MKL hardly benefits form Heper-Threading, but if you want (just to compare) you may force MKL to use 4 threads:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;mkl_set_num_threads(4);&lt;BR /&gt;mkl_set_dynamic(0);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The point is that if mkl_dynamic is 1, than MKL will reduce the number of threads down to 2 (a number of physical cores) due to perfromance considerations. And if mkl_dynamic is diasabled than MKL [theoretically] doesn't permitted to make it.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Konstantin&lt;/DIV&gt;</description>
    <pubDate>Wed, 20 Oct 2010 05:11:18 GMT</pubDate>
    <dc:creator>Konstantin_A_Intel</dc:creator>
    <dc:date>2010-10-20T05:11:18Z</dc:date>
    <item>
      <title>threading problem in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813243#M4070</link>
      <description>Dear all,&lt;BR /&gt;&lt;BR /&gt;I am using MKL, version 10.2.3 Product Build 20091130 on a Intel 64 Linux machine. My system is a dual core system but using Intel Hyper Threading, it appears that four processors are available. The problem is that when I run my code on this machine, MKL parts always use only two cores, and the two other processors are always idle. The core that I run to initialize MKL is as below:&lt;BR /&gt;&lt;BR /&gt; procs=omp_get_num_procs();&lt;BR /&gt; omp_set_num_threads(procs);&lt;BR /&gt;&lt;BR /&gt; mkl_set_num_threads(procs);&lt;BR /&gt; mkl_set_dynamic(1);&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I would like to know, why the code doesn't use all processors when it is running. I also know that I can force it to use e.g. only one processor by setting number of omp processors to one as:&lt;BR /&gt;&lt;BR /&gt; omp_set_num_threads(1);&lt;BR /&gt;&lt;BR /&gt;if I am right! Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;D.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sun, 03 Oct 2010 22:04:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813243#M4070</guid>
      <dc:creator>Dan4</dc:creator>
      <dc:date>2010-10-03T22:04:38Z</dc:date>
    </item>
    <item>
      <title>threading problem in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813244#M4071</link>
      <description>Hyperthreading  can improve throughput if there exist CPU resources that are underutilized without hyperthreading enabled. However, if you try to push the same calculation through all threads in a dual-core CPU with four hyperthreads instead of two, hyperthreading can actually slow down your program. Hyperthreading is not a technique that can materialize, from thin air, non-existent pipelines, internal register files and execution units.&lt;BR /&gt;&lt;BR /&gt;Read this informative post: &lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=67622"&gt;should hyperthreading be used?&lt;/A&gt;</description>
      <pubDate>Mon, 04 Oct 2010 00:14:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813244#M4071</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2010-10-04T00:14:33Z</dc:date>
    </item>
    <item>
      <title>threading problem in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813245#M4072</link>
      <description>Hi Dan,&lt;SPAN style="font-family: verdana, sans-serif; font-size: 10.8333px;"&gt;mesei4 is absolutely right with his answer.and these are my 2 cents into this thread: yes can push MKL to run with 1 thread by calling omp_set_num_threads(1) or mkl_set_num_threads(1) routines. Please reember for this case, that mkl_set_num_threads() does have precedence over omp_set_num_threads().&lt;/SPAN&gt;&lt;DIV&gt;&lt;SPAN style="font-family: verdana, sans-serif; font-size: 10.8333px;"&gt;--Gennady&lt;/SPAN&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 04 Oct 2010 05:28:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813245#M4072</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2010-10-04T05:28:34Z</dc:date>
    </item>
    <item>
      <title>threading problem in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813246#M4073</link>
      <description>In the reference, the recommendation&lt;BR /&gt;KMP_AFFINITY=granularity=fine,compact,1,0&lt;BR /&gt;must assume a BIOS in which even-odd pairs of logicals (e.g. 0,1) share the same core. This is not always the way it's done, although it seems common lately for single and dual socket platforms.&lt;BR /&gt;I was surprised again how important these settings are when HyperThreading is enabled, even on a current single socket platform which has this expected assignment of logicals, where KMP_AFFINITY=compact,1 is correct, but must be specified, along with corresponding NUM_THREADS.</description>
      <pubDate>Mon, 04 Oct 2010 10:40:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813246#M4073</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2010-10-04T10:40:11Z</dc:date>
    </item>
    <item>
      <title>threading problem in MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813247#M4074</link>
      <description>Hi, m&lt;SPAN style="font-family: verdana, sans-serif;"&gt;y 2 cents in addition to the previous comments.&lt;/SPAN&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Yes, it's correct that MKL hardly benefits form Heper-Threading, but if you want (just to compare) you may force MKL to use 4 threads:&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;mkl_set_num_threads(4);&lt;BR /&gt;mkl_set_dynamic(0);&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;The point is that if mkl_dynamic is 1, than MKL will reduce the number of threads down to 2 (a number of physical cores) due to perfromance considerations. And if mkl_dynamic is diasabled than MKL [theoretically] doesn't permitted to make it.&lt;/DIV&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Konstantin&lt;/DIV&gt;</description>
      <pubDate>Wed, 20 Oct 2010 05:11:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/threading-problem-in-MKL/m-p/813247#M4074</guid>
      <dc:creator>Konstantin_A_Intel</dc:creator>
      <dc:date>2010-10-20T05:11:18Z</dc:date>
    </item>
  </channel>
</rss>

