<?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 Difference between 1 thread and multiple threads for 3-D FFT MKL real-&amp;gt;complex transform in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-between-1-thread-and-multiple-threads-for-3-D-FFT-MKL/m-p/1662226#M36899</link>
    <description>&lt;P&gt;I have a simple MKL code that does a 3-D MKL FFT transform in place real to complex and back. I see that the results are slightly different when comparing the output from 1 OpenMP thread to multiple threads. There is no difference between 2 vs 3 or any other multiple threads.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching a simple reproducer that stores outputs into files and then compares them between 1 thread and multiple threads. For the 1vs2 threads comparison, numpy.allclose() fails, and the RMS of difference is non-zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ icpx -v&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)&lt;/P&gt;&lt;P&gt;$ uname -a&lt;BR /&gt;Linux hostname 4.18.0-553.5.1.el8_10.x86_64 #1 SMP&lt;/P&gt;&lt;P&gt;$ head /proc/cpuinfo | grep "model name"&lt;BR /&gt;model name : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same test passes 1vs2 threads output on a non-Intel machine with no numerical difference between the outputs. The only difference on that machine is the CPU:&lt;/P&gt;&lt;P&gt;$ head /proc/cpuinfo | grep "model name"&lt;BR /&gt;model name : AMD EPYC 7302P 16-Core Processor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any guidance regarding eliminating that difference on the Intel proc if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Sat, 01 Feb 2025 02:30:44 GMT</pubDate>
    <dc:creator>vbashkardin</dc:creator>
    <dc:date>2025-02-01T02:30:44Z</dc:date>
    <item>
      <title>Difference between 1 thread and multiple threads for 3-D FFT MKL real-&gt;complex transform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-between-1-thread-and-multiple-threads-for-3-D-FFT-MKL/m-p/1662226#M36899</link>
      <description>&lt;P&gt;I have a simple MKL code that does a 3-D MKL FFT transform in place real to complex and back. I see that the results are slightly different when comparing the output from 1 OpenMP thread to multiple threads. There is no difference between 2 vs 3 or any other multiple threads.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am attaching a simple reproducer that stores outputs into files and then compares them between 1 thread and multiple threads. For the 1vs2 threads comparison, numpy.allclose() fails, and the RMS of difference is non-zero.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ icpx -v&lt;BR /&gt;Intel(R) oneAPI DPC++/C++ Compiler 2024.1.0 (2024.1.0.20240308)&lt;/P&gt;&lt;P&gt;$ uname -a&lt;BR /&gt;Linux hostname 4.18.0-553.5.1.el8_10.x86_64 #1 SMP&lt;/P&gt;&lt;P&gt;$ head /proc/cpuinfo | grep "model name"&lt;BR /&gt;model name : Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same test passes 1vs2 threads output on a non-Intel machine with no numerical difference between the outputs. The only difference on that machine is the CPU:&lt;/P&gt;&lt;P&gt;$ head /proc/cpuinfo | grep "model name"&lt;BR /&gt;model name : AMD EPYC 7302P 16-Core Processor&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would appreciate any guidance regarding eliminating that difference on the Intel proc if possible.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Sat, 01 Feb 2025 02:30:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-between-1-thread-and-multiple-threads-for-3-D-FFT-MKL/m-p/1662226#M36899</guid>
      <dc:creator>vbashkardin</dc:creator>
      <dc:date>2025-02-01T02:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Difference between 1 thread and multiple threads for 3-D FFT MKL real-&gt;complex transform</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-between-1-thread-and-multiple-threads-for-3-D-FFT-MKL/m-p/1663544#M36918</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What numerical difference did you get there?&lt;/P&gt;
&lt;P&gt;I noticed a very small difference in the test results here. For this RMS,&amp;nbsp; it looks fine: &lt;BR /&gt;RMS of difference: 1.5889534e-10&lt;/P&gt;
&lt;P&gt;Since this computation uses single-precision floating-point, and the fractional part is 23 bits, giving it a precision of about 1e-7 to 1e-6 in the computation.&lt;/P&gt;
&lt;P&gt;I made a minor change to the np.allclose() code, and it passes the test:&lt;/P&gt;
&lt;P&gt;print("Allclose: ", np.allclose(array1, array2, atol=1e-07))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks,&lt;BR /&gt;Chao&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Feb 2025 02:09:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Difference-between-1-thread-and-multiple-threads-for-3-D-FFT-MKL/m-p/1663544#M36918</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2025-02-06T02:09:29Z</dc:date>
    </item>
  </channel>
</rss>

