<?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 FFT incorrect output [regression] in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145405#M26661</link>
    <description>&lt;P&gt;Hello everyone,&lt;/P&gt;

&lt;P&gt;I've noticed that the MKL is giving me a wrong result while calculating 3D real-to-complex in-place FFT with specific sizes. I've found a test program on this forums to confirm it's not a bug in my code, attaching the source code with settings I've used.&lt;/P&gt;

&lt;P&gt;The error is present using both Windows and GNU/Linux, and all the Intel MKL versions &lt;EM&gt;following 2017.0.0&lt;/EM&gt; are broken (the 2017.0.0 version is the last &lt;EM&gt;working&lt;/EM&gt; for me). I can use a newer Intel C Compiler but have to link the older MKL library in order to get a working code so it seems to be a bug in the library itself.&lt;/P&gt;

&lt;P&gt;Compiling on GNU/Linux with:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;icc basic_sp_real_dft_3d.c -DMKL_ILP64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -o dfttest -qopenmp&lt;/PRE&gt;

&lt;P&gt;Output:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;Intel(R) Math Kernel Library Version 2017.0.3 Product Build 20170413 for Intel(R) 64 architecture applications
Example basic_sp_real_dft_3d
Forward-Backward single-precision in-place 3D real FFT
Configuration parameters:
 DFTI_PRECISION                = DFTI_SINGLE
 DFTI_FORWARD_DOMAIN           = DFTI_REAL
 DFTI_DIMENSION                = 3
 DFTI_LENGTHS                  = {360, 384, 433}
 DFTI_PLACEMENT                = DFTI_INPLACE
 DFTI_CONJUGATE_EVEN_STORAGE   = DFTI_COMPLEX_COMPLEX
Create DFTI descriptor
Set configuration: CCE storage
Set input  strides = { 0, 166656, 434, 1 }
Set output strides = { 0, 83328, 217, 1 }
Commit the descriptor
Allocate data array
Initialize data for r2c transform
Compute real-to-complex in-place transform
Verify the result
 Check if err is below errthr 7.7e-06
 Verified,  maximum error was 2.67e-07
Change strides to compute backward transform
Commit the descriptor
Initialize data for c2r transform
Compute backward transform
Verify the result
 Check if err is below errthr 7.7e-06
 x[359][2][0]:  expected 0,  got 0.0003608387,  err 0.000361
 Verification FAILED
 ERROR, status = 1
Free DFTI descriptor
Free data array
TEST FAILED&lt;/PRE&gt;

&lt;P&gt;Thanks for pointing out if I'm doing anything wrong. It would be nice to get a working version otherwise :).&lt;/P&gt;</description>
    <pubDate>Wed, 12 Jul 2017 08:25:54 GMT</pubDate>
    <dc:creator>Budisky__Jakub</dc:creator>
    <dc:date>2017-07-12T08:25:54Z</dc:date>
    <item>
      <title>FFT incorrect output [regression]</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145405#M26661</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;

&lt;P&gt;I've noticed that the MKL is giving me a wrong result while calculating 3D real-to-complex in-place FFT with specific sizes. I've found a test program on this forums to confirm it's not a bug in my code, attaching the source code with settings I've used.&lt;/P&gt;

&lt;P&gt;The error is present using both Windows and GNU/Linux, and all the Intel MKL versions &lt;EM&gt;following 2017.0.0&lt;/EM&gt; are broken (the 2017.0.0 version is the last &lt;EM&gt;working&lt;/EM&gt; for me). I can use a newer Intel C Compiler but have to link the older MKL library in order to get a working code so it seems to be a bug in the library itself.&lt;/P&gt;

&lt;P&gt;Compiling on GNU/Linux with:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;icc basic_sp_real_dft_3d.c -DMKL_ILP64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -o dfttest -qopenmp&lt;/PRE&gt;

&lt;P&gt;Output:&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;Intel(R) Math Kernel Library Version 2017.0.3 Product Build 20170413 for Intel(R) 64 architecture applications
Example basic_sp_real_dft_3d
Forward-Backward single-precision in-place 3D real FFT
Configuration parameters:
 DFTI_PRECISION                = DFTI_SINGLE
 DFTI_FORWARD_DOMAIN           = DFTI_REAL
 DFTI_DIMENSION                = 3
 DFTI_LENGTHS                  = {360, 384, 433}
 DFTI_PLACEMENT                = DFTI_INPLACE
 DFTI_CONJUGATE_EVEN_STORAGE   = DFTI_COMPLEX_COMPLEX
Create DFTI descriptor
Set configuration: CCE storage
Set input  strides = { 0, 166656, 434, 1 }
Set output strides = { 0, 83328, 217, 1 }
Commit the descriptor
Allocate data array
Initialize data for r2c transform
Compute real-to-complex in-place transform
Verify the result
 Check if err is below errthr 7.7e-06
 Verified,  maximum error was 2.67e-07
Change strides to compute backward transform
Commit the descriptor
Initialize data for c2r transform
Compute backward transform
Verify the result
 Check if err is below errthr 7.7e-06
 x[359][2][0]:  expected 0,  got 0.0003608387,  err 0.000361
 Verification FAILED
 ERROR, status = 1
Free DFTI descriptor
Free data array
TEST FAILED&lt;/PRE&gt;

&lt;P&gt;Thanks for pointing out if I'm doing anything wrong. It would be nice to get a working version otherwise :).&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 08:25:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145405#M26661</guid>
      <dc:creator>Budisky__Jakub</dc:creator>
      <dc:date>2017-07-12T08:25:54Z</dc:date>
    </item>
    <item>
      <title>thanks, we take a look at the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145406#M26662</link>
      <description>&lt;P&gt;thanks, we take a look at the case. Is this case happens with ILP64 or lp64 API too? Are there any specific CPU where do you this issue?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2017 15:39:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145406#M26662</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2017-07-12T15:39:28Z</dc:date>
    </item>
    <item>
      <title>I've just checked, and even</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145407#M26663</link>
      <description>&lt;P&gt;I've just checked, and even thought I use 64-bit API (ILP64) it is broken with 32-bit (LP64) one too, with the exact same result.&lt;/P&gt;

&lt;P&gt;As far as processors go, I can confirm it's broken on several (at least E5-2620, E5-2695, i5-6500). Weirdly enough, it seems to work (both APIs) on&amp;nbsp;E5-2670. To confirm this, I've tried to link the library statically on the E5-2670 machine and it still yields the wrong result on the others.&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Edit:&lt;/STRONG&gt;&lt;BR /&gt;
	So with some help I've obtained results from more systems. So to summarize:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Sandy Bridge&lt;/STRONG&gt; - E5-2650, E5-2670&lt;BR /&gt;
	&lt;STRONG&gt;Ivy Bridge&lt;/STRONG&gt; - i7-3770&lt;BR /&gt;
	&lt;EM&gt;are passing the attached test;&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Haswell&lt;/STRONG&gt; - E5-2620 v3, E5-2695 v3&lt;BR /&gt;
	&lt;STRONG&gt;Broadwell&lt;/STRONG&gt; - E5-2620 v4&lt;BR /&gt;
	&lt;STRONG&gt;Skylake&lt;/STRONG&gt; - i5-6500&lt;BR /&gt;
	&lt;EM&gt;are failing the attached test.&lt;/EM&gt;&lt;/P&gt;

&lt;P&gt;Since I suspect the MKL supports the conditional code execution depending on the architecture, AVX2 version is probably the one to blame.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2017 07:34:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-incorrect-output-regression/m-p/1145407#M26663</guid>
      <dc:creator>Budisky__Jakub</dc:creator>
      <dc:date>2017-07-13T07:34:00Z</dc:date>
    </item>
  </channel>
</rss>

