- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

I noticed I was getting some incorrect output for some fft's, I noticed all the incorrect output corresponded to fft's of length 168. Code which reproduces the error, mkl_test.c, and its output mkl_test.txt are attached.

In the attached code I am doing fft for a complex signal encoding a real signal, (all the imaginary values are 0), so the 0^th sine coefficient should be 0, but this is not what I get.

Link Copied

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Arin!

Yes, the output is incorrect. I've tried to reproduce the failure on our side but without success - your code produces correct output (I have tested both ia32 and inte64 arches on Linux OS, with different MKL versions and different IA).

Could you please specify what processor, OS, architecture, MKL version and compiler do you use?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Thank you for your response, I use a build system that abstracts away these details for us, I will find out and update this track.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Arin,

win64 produces the correct output with the 11.2 beta too, so, we need more details for reproducing the issue.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

1 .Intel Compiler version: icc (ICC) 13.1.0 20130121

2. The MKL version shipped with this compiler is version 11.0.2

3. Built with the following flags -static-intel –mkl=sequential

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Arin!

Yes, finally I was able to reproduce the issue. The environment was: both Mac 64bit and 32bit on Intel Core i7. MKL 11.0.2 and MKL 11.0.3 gave me incorrect results. However MKL 11.0.4 and higher perform fft in a right way. Linux and Windows version are also not affected.

So could please try newer version of MKL? Or, if this suggestion doesn't work for you, you can try the following workaround: since you do real to complex fft, try to use r2c transform, instead of c2c. Actually this way is preferable because r2c is twice faster then c2c and needs less memory.

I attached modified version of your mkl_tests.c - mkl_test_r2c.c. It produces correct results (compare r2c.txt and c2c.txt).

Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Evarist,

What is the workaround if I have to perform fft on a complex signal?

-Arin

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content

Hi Arin!

Probably the only one workaround for c2c is to use DFTI_COMPLEX_COMPLEX format instead of DFTI_REAL_REAL of DFTI_COMPLEX_STORAGE setting.

Updating to MKL 11.0.4 and higher should also resolve the problem.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page