<?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 found answer and a bug maybe in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/found-answer-and-a-bug-maybe/m-p/937085#M14184</link>
    <description>I think this is an mkl bug:&lt;BR /&gt;&lt;BR /&gt;I don't set OMP_NUM_THREADS&lt;BR /&gt;My code uses the omp_set_num_threads()&lt;BR /&gt;It seems though that unless OMP_NUM_THREADS is set to something at the beggining of the program it won't honor any future calls to omp_set_num_threads()&lt;BR /&gt;Now, if I take out the call to the MKL function, the plain openmp for loop will actually be parallelized well.&lt;BR /&gt;&lt;BR /&gt;[jpuig@altix jpuig]$ export -n OMP_NUM_THREADS&lt;BR /&gt;[jpuig@altix jpuig]$ ./a.out&lt;BR /&gt;Elapsed time: 1.8064 - 1 threads loop ratio:1&lt;BR /&gt;Elapsed time: 1.79981 - 2 threads loop ratio:0.996353&lt;BR /&gt;Elapsed time: 1.85461 - 3 threads loop ratio:1.02669&lt;BR /&gt;Elapsed time: 1.82016 - 4 threads loop ratio:1.00762&lt;BR /&gt;[jpuig@altix jpuig]$ export OMP_NUM_THREADS=4&lt;BR /&gt;[jpuig@altix jpuig]$ ./a.out&lt;BR /&gt;Elapsed time: 1.84285 - 1 threads loop ratio:1&lt;BR /&gt;Elapsed time: 0.929641 - 2 threads loop ratio:0.504457&lt;BR /&gt;Elapsed time: 0.62401 - 3 threads loop ratio:0.338611&lt;BR /&gt;Elapsed time: 0.476085 - 4 threads loop ratio:0.258341&lt;BR /&gt;[jpuig@altix jpuig]$</description>
    <pubDate>Tue, 04 Apr 2006 04:51:26 GMT</pubDate>
    <dc:creator>joan_puig</dc:creator>
    <dc:date>2006-04-04T04:51:26Z</dc:date>
    <item>
      <title>found answer and a bug maybe</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/found-answer-and-a-bug-maybe/m-p/937085#M14184</link>
      <description>I think this is an mkl bug:&lt;BR /&gt;&lt;BR /&gt;I don't set OMP_NUM_THREADS&lt;BR /&gt;My code uses the omp_set_num_threads()&lt;BR /&gt;It seems though that unless OMP_NUM_THREADS is set to something at the beggining of the program it won't honor any future calls to omp_set_num_threads()&lt;BR /&gt;Now, if I take out the call to the MKL function, the plain openmp for loop will actually be parallelized well.&lt;BR /&gt;&lt;BR /&gt;[jpuig@altix jpuig]$ export -n OMP_NUM_THREADS&lt;BR /&gt;[jpuig@altix jpuig]$ ./a.out&lt;BR /&gt;Elapsed time: 1.8064 - 1 threads loop ratio:1&lt;BR /&gt;Elapsed time: 1.79981 - 2 threads loop ratio:0.996353&lt;BR /&gt;Elapsed time: 1.85461 - 3 threads loop ratio:1.02669&lt;BR /&gt;Elapsed time: 1.82016 - 4 threads loop ratio:1.00762&lt;BR /&gt;[jpuig@altix jpuig]$ export OMP_NUM_THREADS=4&lt;BR /&gt;[jpuig@altix jpuig]$ ./a.out&lt;BR /&gt;Elapsed time: 1.84285 - 1 threads loop ratio:1&lt;BR /&gt;Elapsed time: 0.929641 - 2 threads loop ratio:0.504457&lt;BR /&gt;Elapsed time: 0.62401 - 3 threads loop ratio:0.338611&lt;BR /&gt;Elapsed time: 0.476085 - 4 threads loop ratio:0.258341&lt;BR /&gt;[jpuig@altix jpuig]$</description>
      <pubDate>Tue, 04 Apr 2006 04:51:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/found-answer-and-a-bug-maybe/m-p/937085#M14184</guid>
      <dc:creator>joan_puig</dc:creator>
      <dc:date>2006-04-04T04:51:26Z</dc:date>
    </item>
  </channel>
</rss>

