<?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 max core/thread utilzation in MKL with Core 2 T5500 and EPD/num in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/max-core-thread-utilzation-in-MKL-with-Core-2-T5500-and-EPD/m-p/811007#M3918</link>
    <description>Have you used threaded MKL libs when build NumPY/SciPY ?</description>
    <pubDate>Thu, 05 Jul 2012 08:54:42 GMT</pubDate>
    <dc:creator>VipinKumar_E_Intel</dc:creator>
    <dc:date>2012-07-05T08:54:42Z</dc:date>
    <item>
      <title>max core/thread utilzation in MKL with Core 2 T5500 and EPD/numpy FFT?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/max-core-thread-utilzation-in-MKL-with-Core-2-T5500-and-EPD/m-p/811006#M3917</link>
      <description>&lt;SPAN style="color: #800000;"&gt;Main question: How do I coerce the MKL to thread my fft calls?&lt;BR /&gt;We are using Enthought Python with MKL linked to numpy &lt;/SPAN&gt;&lt;A title="http://www.enthought.com/epd/mkl/" href="http://www.enthought.com/epd/mkl/"&gt;http://www.enthought.com/epd/mkl/&lt;/A&gt;&lt;SPAN style="color: #800000;"&gt;.&lt;BR /&gt;
A 2D complex fft of random data with shape of (2, 65536) over 100 loops still only uses 50%.&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000;"&gt;Envronment is XP WIn32, py2.7, &lt;/SPAN&gt;Intel MKL version: Intel Math Kernel Library Version 10.3.1 Product Build 20101110 for 32-bit applications, max Intel threads: 2&lt;BR /&gt;&lt;SPAN style="color: #800000;"&gt;
My test script is attached.&lt;BR /&gt;
On a Core 2 Duo, I:&lt;/SPAN&gt;&lt;TT&gt;&lt;BR /&gt;
&lt;/TT&gt;&lt;SPAN style="color: #800000;"&gt;- removed the env var &lt;/SPAN&gt;MKL_NUM_THREADS&lt;SPAN style="color: #800000;"&gt;, rebooted, and use &lt;/SPAN&gt;&lt;TT&gt;mkl.set_num_threads(2)&lt;BR /&gt;
&lt;/TT&gt;&lt;SPAN style="color: #800000;"&gt;- verified both cores do have affinity checked.&lt;BR /&gt;&lt;BR /&gt;I also read this:&lt;BR /&gt;&lt;/SPAN&gt;&lt;A target="_blank" title="http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/mklxe/mkl_userguide_win/MKL_UG_managing_performance/Threaded_Routines.htm#fft" href="http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/mklxe/mkl_userguide_win/MKL_UG_managing_performance/Threaded_Routines.htm#fft"&gt;http://software.intel.com/sites/products/documentation/hpc/composerxe/en-us/mklxe/mkl_userguide_win/MKL_UG_managing_performance/Threaded_Routines.htm#fft&lt;/A&gt;&lt;BR /&gt;&lt;SPAN style="color: #800000;"&gt;&lt;BR /&gt;
Script results:&lt;BR /&gt;True&lt;BR /&gt;
&lt;/SPAN&gt;Intel MKL version: Intel Math Kernel Library Version 10.3.1 Product Build 20101110 for 32-bit applications&lt;BR /&gt;
Intel cpu_clocks: 8903351421090&lt;BR /&gt;
Intel cpu_frequency: 1.66251&lt;BR /&gt;
max Intel threads: 2&lt;BR /&gt;
using numpy 1.5.1&lt;BR /&gt;
(2, 65536) items&lt;BR /&gt;
simple loop 2.54858477242&lt;BR /&gt;&lt;BR /&gt;___________ Script: _________&lt;BR /&gt;&lt;BR /&gt;import numpy&lt;BR /&gt;import numpy.fft as fft&lt;BR /&gt;print numpy.use_fastnumpy&lt;BR /&gt;import time&lt;BR /&gt;import mkl&lt;BR /&gt;&lt;BR /&gt;print 'Intel MKL version:', mkl.get_version_string()&lt;BR /&gt;print 'Intel cpu_clocks:', mkl.get_cpu_clocks()&lt;BR /&gt;print 'Intel cpu_frequency:', mkl.get_cpu_frequency()&lt;BR /&gt;#print 'Intel MKL, freeing buffer memory:', mkl.thread_free_buffers()&lt;BR /&gt;&lt;BR /&gt;print 'max Intel threads:', mkl.get_max_threads()&lt;BR /&gt;mkl.set_num_threads(2)&lt;BR /&gt;&lt;BR /&gt;N = 2**16&lt;BR /&gt;&lt;BR /&gt;print 'using numpy', numpy.__version__&lt;BR /&gt;a = numpy.random.rand(2, N)&lt;BR /&gt;print a.shape, 'items'&lt;BR /&gt;t0 = time.clock()&lt;BR /&gt;for i in range(10):&lt;BR /&gt; continue&lt;BR /&gt;base = time.clock()-t0&lt;BR /&gt;fftn = fft.fftn&lt;BR /&gt;t0 = time.clock()&lt;BR /&gt;for i in range(10):&lt;BR /&gt; r = fftn(a, (N,), (1,))&lt;BR /&gt;print 'simple loop', time.clock()-t0-base&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 06 Jun 2011 22:24:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/max-core-thread-utilzation-in-MKL-with-Core-2-T5500-and-EPD/m-p/811006#M3917</guid>
      <dc:creator>rjsdotorg</dc:creator>
      <dc:date>2011-06-06T22:24:28Z</dc:date>
    </item>
    <item>
      <title>max core/thread utilzation in MKL with Core 2 T5500 and EPD/num</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/max-core-thread-utilzation-in-MKL-with-Core-2-T5500-and-EPD/m-p/811007#M3918</link>
      <description>Have you used threaded MKL libs when build NumPY/SciPY ?</description>
      <pubDate>Thu, 05 Jul 2012 08:54:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/max-core-thread-utilzation-in-MKL-with-Core-2-T5500-and-EPD/m-p/811007#M3918</guid>
      <dc:creator>VipinKumar_E_Intel</dc:creator>
      <dc:date>2012-07-05T08:54:42Z</dc:date>
    </item>
  </channel>
</rss>

