<?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: MKL FFT bin zero real and imaginary parts (part II) in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297285#M31720</link>
    <description>&lt;P&gt;Hi Rajesh,&lt;/P&gt;
&lt;P&gt;In your example you are using DOUBLE instead of SINGLE. &lt;STRIKE&gt;You should reproduce the problem by changing to SINGLE.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;UPDATE: I've changed to SINGLE and it doesn't reproduces. I'll take a look.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pedro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 09 Jul 2021 10:42:02 GMT</pubDate>
    <dc:creator>pedro-erencia</dc:creator>
    <dc:date>2021-07-09T10:42:02Z</dc:date>
    <item>
      <title>MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1296917#M31708</link>
      <description>&lt;P&gt;Since my &lt;A href="https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts/td-p/1296556?profile.language=ko" target="_self"&gt;previous post&lt;/A&gt; didn't have much success I've made a reproducible program in case anyone wants to take a look.&lt;/P&gt;
&lt;P&gt;I'm trying to do an FFT on .NET using MKL. I've downloaded the &lt;A href="https://software.intel.com/content/www/us/en/develop/articles/using-intel-mkl-in-your-c-program.html" target="_self"&gt;examples&lt;/A&gt;&amp;nbsp; and modified the code to show my case.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="csharp"&gt;public class Test_dfti
{
    private Test_dfti() { }
    public static void Main(string[] args)
    {
        int num_samples = 20480;        

        /* The data to be transformed */
        float[] x_normal = new float[num_samples + 2]; // CSS requires an array of N + 2
        /* Initialize the data array */
        int sampling_freq = 1024000;
        int tone = 16000;
        int amplitude = 1;
        for (int i = 0; i &amp;lt; num_samples; i++)
        {
            x_normal[i] = amplitude * (float)Math.Sin((2 * 3.14159265358979323846 / sampling_freq) * i * tone);
        }

        IntPtr desc = new();        
        /* Create new DFTI descriptor */
        if (
           (DFTI.DftiCreateDescriptor(ref desc, DFTI.SINGLE,  DFTI.REAL, 1, num_samples) == 0)
        &amp;amp;&amp;amp; (DFTI.DftiSetValue(desc, DFTI.PLACEMENT, DFTI.INPLACE) == 0)
        &amp;amp;&amp;amp; (DFTI.DftiSetValue(desc, DFTI.PACKED_FORMAT, DFTI.CCS_FORMAT) == 0)
        &amp;amp;&amp;amp; (DFTI.DftiCommitDescriptor(desc) == 0)
        &amp;amp;&amp;amp; (DFTI.DftiComputeForward(desc, x_normal) == 0))
        {
            Console.WriteLine(x_normal[19840] + " - " + x_normal[19841]);
        }
    }
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As can be seen in the code, I'm doing a 1D, inplace, single precission fft of 20480 samples from a tone of 16K sampled at 1.024 Msps. The output is in CCS format.&lt;/P&gt;
&lt;P&gt;The problem is that bin 9920 (array positions 19840, 19840 + 1) is 0+0i. I understand that this shouldn't happen with the input tone. This 0+0i bin happens at different places with different frequencies other than 16K. Sometimes there's no 0+0i bin, sometimes there are several, depending on the input tone.&lt;/P&gt;
&lt;P&gt;I attached the visual studio project with the full code in case someone tries to reproduce it.&lt;/P&gt;
&lt;P&gt;Note:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the output of MKL_VERBOSE&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;MKL_VERBOSE Intel(R) MKL 2021.0 Update 2 Product build 20210312 for Intel(R) 64 architecture Intel(R) Advanced Vector Extensions 2 (Intel(R) AVX2) enabled processors, Win 3.60GHz intel_thread&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;MKL_VERBOSE FFT(srfi20480,pack:ccs,tLim:1,unaligned_input,desc:000002154E347840) 127.94us CNR:OFF Dyn:1 FastMM:1 TID:0 NThr:1&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jul 2021 09:45:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1296917#M31708</guid>
      <dc:creator>pedro-erencia</dc:creator>
      <dc:date>2021-07-08T09:45:34Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297278#M31719</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have tried using the provided intel example and your inputs and I got x[19840] and x[19841] as&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;5.45696821063757E-12 - -0.000107872744592896 respectively.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have attached the source code below. Please let us know if you have any issues.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 10:16:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297278#M31719</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-07-09T10:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297285#M31720</link>
      <description>&lt;P&gt;Hi Rajesh,&lt;/P&gt;
&lt;P&gt;In your example you are using DOUBLE instead of SINGLE. &lt;STRIKE&gt;You should reproduce the problem by changing to SINGLE.&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;UPDATE: I've changed to SINGLE and it doesn't reproduces. I'll take a look.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pedro.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 10:42:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297285#M31720</guid>
      <dc:creator>pedro-erencia</dc:creator>
      <dc:date>2021-07-09T10:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297292#M31721</link>
      <description>&lt;P&gt;Hi Rajesh,&lt;/P&gt;
&lt;P&gt;You were using doubles throughout all the code, not just in the fft descriptor. We must use floats for performance reasons. The problem only arises with floats.&lt;/P&gt;
&lt;P&gt;I've modified your code, basically just changed the precision of the descriptor to SINGLE and replaced all doubles with floats. Also, I write to the console after the forward fft, not after the backward one.&lt;/P&gt;
&lt;P&gt;I attach the modified code, you can reproduce the problem from it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Pedro&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 10:57:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1297292#M31721</guid>
      <dc:creator>pedro-erencia</dc:creator>
      <dc:date>2021-07-09T10:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1298045#M31749</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your issue was reproducible, but unfortunately, we only support C/C++, DPC++, and Fortran for now. Please visit the below system requirements page.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://software.intel.com/content/www/us/en/develop/articles/oneapi-math-kernel-library-system-requirements.html" target="_blank" rel="noopener"&gt;https://software.intel.com/content/www/us/en/develop/articles/oneapi-math-kernel-library-system-requirements.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try using the supported languages mentioned above and let us know if the issue remains.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Rajesh.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 06:18:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1298045#M31749</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-07-13T06:18:38Z</dc:date>
    </item>
    <item>
      <title>Re:MKL FFT bin zero real and imaginary parts (part II)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1298050#M31750</link>
      <description>&lt;P&gt;&amp;nbsp;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting as a solution!&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We will no longer respond to this thread. If you require any additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Have a Good day.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Rajesh&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 13 Jul 2021 06:31:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-FFT-bin-zero-real-and-imaginary-parts-part-II/m-p/1298050#M31750</guid>
      <dc:creator>MRajesh_intel</dc:creator>
      <dc:date>2021-07-13T06:31:45Z</dc:date>
    </item>
  </channel>
</rss>

