Quantcast
Channel: Intel® oneAPI Math Kernel Library & Intel® Math Kernel Library
Viewing all articles
Browse latest Browse all 2652

FFT incorrect output [regression]

$
0
0

Hello everyone,

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.

The error is present using both Windows and GNU/Linux, and all the Intel MKL versions following 2017.0.0 are broken (the 2017.0.0 version is the last working 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.

Compiling on GNU/Linux with:

icc basic_sp_real_dft_3d.c -DMKL_ILP64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread -o dfttest -qopenmp

Output:

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

Thanks for pointing out if I'm doing anything wrong. It would be nice to get a working version otherwise :).

AttachmentSize
Downloadtext/x-csrcbasic_sp_real_dft_3d.c11.02 KB

Viewing all articles
Browse latest Browse all 2652

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>