<?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: BUG: Race condition in Intel MKL Update 3 matrix multiplication. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BUG-Race-condition-in-Intel-MKL-Update-3-matrix-multiplication/m-p/1284572#M31381</link>
    <description>&lt;P&gt;Hi Tetrakist,&lt;/P&gt;
&lt;P&gt;It has been fixed!&lt;/P&gt;
&lt;P&gt;The latest version of oneMKL is 2021.2.&lt;/P&gt;
&lt;P&gt;I linked R 4.0.5 to oneMKL 2021.2 and your code works as expected!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Khang&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2021 18:07:20 GMT</pubDate>
    <dc:creator>Khang_N_Intel</dc:creator>
    <dc:date>2021-05-25T18:07:20Z</dc:date>
    <item>
      <title>BUG: Race condition in Intel MKL Update 3 matrix multiplication.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BUG-Race-condition-in-Intel-MKL-Update-3-matrix-multiplication/m-p/1214109#M30132</link>
      <description>&lt;P&gt;Note: Upon further research, this erroneous behavior is documented:&lt;/P&gt;
&lt;P&gt;From &lt;A href="https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921207" target="_blank" rel="noopener"&gt;https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=921207&lt;/A&gt; :&lt;/P&gt;
&lt;PRE class="message"&gt;On Sun, Feb 03, 2019 at 12:07:20PM +0000, Mo Zhou wrote:
&amp;gt; It turns out that the incorrect matrix product is a result of
&amp;gt; gomp + iomp library clash: octave is linked against the GNU OMP,
&amp;gt; while libmkl-rt.so invokes Intel(LLVM) OMP by default.

I got in touch with MKL team and they confirmed that the iomp+gomp
mixture is actually a very common error among users. They plan to change
the loading mechanism of libmkl-rt for the 2020 production line, to
avoid iomp+gomp clash (sounds like yet another magic).

So let's keep this bug open for both MKL and Octave for a while,
in case any other user came across similar errors. Maybe this
bug will be fixed in the late 2019 (they released MKL 2019 in late
2018).&lt;/PRE&gt;
&lt;P&gt;Clearly, this has not been fixed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;=====&lt;/P&gt;
&lt;P&gt;In R 4.0.2 on Debian 10 running the Intel(R) Math Kernel Library 2020 Update 3 for Linux, the following R code produces inconsistent results:&lt;/P&gt;
&lt;P&gt;==Code==&lt;/P&gt;
&lt;P&gt;n &amp;lt;- 10000&lt;BR /&gt;d &amp;lt;- as.matrix(data.frame(&lt;BR /&gt;var.a = seq(0,1, length.out = n),&lt;BR /&gt;var.b = seq(0,1, length.out = n,&lt;BR /&gt;var.c = seq(0,1, length.out = n),&lt;BR /&gt;var.d = seq(0,1, length.out = n)&lt;BR /&gt;))&lt;/P&gt;
&lt;P&gt;for(i in 1:10){&lt;BR /&gt;print(max((d %*% (c(1,1,1,1)))))&lt;/P&gt;
&lt;P&gt;}&lt;/P&gt;
&lt;P&gt;==OUTPUT==&lt;/P&gt;
&lt;P&gt;[1] 8&lt;BR /&gt;[1] 8&lt;BR /&gt;[1] 4&lt;BR /&gt;[1] 12&lt;BR /&gt;[1] 8&lt;BR /&gt;[1] 4&lt;BR /&gt;[1] 8&lt;BR /&gt;[1] 12&lt;BR /&gt;[1] 8&lt;BR /&gt;[1] 14.38524&lt;/P&gt;
&lt;P&gt;=====&lt;/P&gt;
&lt;P&gt;Removal of the Intel MKL package results in consistent output. Alternately, setting n &amp;lt;- 1000, produces consistent output. When n&amp;lt;-1000, only one core runs the code. When n &amp;lt;- 10000, then all cores run the code. The behavior is also present if the Debian 10 package "libmkl-rt" version 2020.1.217-2 is installed.&lt;/P&gt;
&lt;P&gt;==Misc. Info==&lt;/P&gt;
&lt;P&gt;Debian 10 R package:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; r-base-core 4.0.2-1&lt;/P&gt;
&lt;P&gt;Intel MKL package (64-bit):&lt;/P&gt;
&lt;P&gt;&amp;nbsp; intel-mkl-core-rt-2020.3-279&lt;/P&gt;
&lt;P&gt;/proc/cpuinfo:&lt;/P&gt;
&lt;P&gt;processor : 0&lt;BR /&gt;vendor_id : GenuineIntel&lt;BR /&gt;cpu family : 6&lt;BR /&gt;model : 45&lt;BR /&gt;model name : Intel(R) Xeon(R) CPU E5-2667 0 @ 2.90GHz&lt;BR /&gt;stepping : 7&lt;BR /&gt;microcode : 0x710&lt;BR /&gt;cpu MHz : 1197.151&lt;BR /&gt;cache size : 15360 KB&lt;BR /&gt;physical id : 0&lt;BR /&gt;siblings : 6&lt;BR /&gt;core id : 0&lt;BR /&gt;cpu cores : 6&lt;BR /&gt;apicid : 0&lt;BR /&gt;initial apicid : 0&lt;BR /&gt;fpu : yes&lt;BR /&gt;fpu_exception : yes&lt;BR /&gt;cpuid level : 13&lt;BR /&gt;wp : yes&lt;BR /&gt;flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx lahf_lm epb pti tpr_shadow vnmi flexpriority ept vpid xsaveopt dtherm ida arat pln pts&lt;BR /&gt;bugs : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit&lt;BR /&gt;bogomips : 5786.30&lt;BR /&gt;clflush size : 64&lt;BR /&gt;cache_alignment : 64&lt;BR /&gt;address sizes : 46 bits physical, 48 bits virtual&lt;BR /&gt;power management:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 01 Oct 2020 16:33:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BUG-Race-condition-in-Intel-MKL-Update-3-matrix-multiplication/m-p/1214109#M30132</guid>
      <dc:creator>Tetrakist</dc:creator>
      <dc:date>2020-10-01T16:33:59Z</dc:date>
    </item>
    <item>
      <title>Re: BUG: Race condition in Intel MKL Update 3 matrix multiplication.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BUG-Race-condition-in-Intel-MKL-Update-3-matrix-multiplication/m-p/1284572#M31381</link>
      <description>&lt;P&gt;Hi Tetrakist,&lt;/P&gt;
&lt;P&gt;It has been fixed!&lt;/P&gt;
&lt;P&gt;The latest version of oneMKL is 2021.2.&lt;/P&gt;
&lt;P&gt;I linked R 4.0.5 to oneMKL 2021.2 and your code works as expected!&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[1] 16&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Khang&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2021 18:07:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/BUG-Race-condition-in-Intel-MKL-Update-3-matrix-multiplication/m-p/1284572#M31381</guid>
      <dc:creator>Khang_N_Intel</dc:creator>
      <dc:date>2021-05-25T18:07:20Z</dc:date>
    </item>
  </channel>
</rss>

