<?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 Andrew, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057014#M21482</link>
    <description>&lt;P&gt;Andrew,&lt;/P&gt;

&lt;P&gt;Regarding the frequency of the Backward Fourier Transform (BFT):&lt;/P&gt;

&lt;P&gt;In your last ffttest.f90, you want to do BFT of DiracDelta(w-1.5).&lt;/P&gt;

&lt;P&gt;First, according to the DFT math formula shown above, the frequency of the result should be 1.5*2π instead of 1.5, which means that the period should be 0.667 instead of 4.19.&lt;/P&gt;

&lt;P&gt;Second, in order to see the correct frequency, you need to write your results as&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    do j=-nLength/2,nLength/2-1
       write(15,*) j/6.28,real( nListIn (mod(j+nLength,nLength)) )
       write(16,*) j/6.28,real( nListOut(mod(j+nLength,nLength)) )
       write(17,*) j/6.28,imag( nListOut(mod(j+nLength,nLength)) )
    end do
&lt;/PRE&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;If the the real and imaginary part still have the same phase, then I don't know why is that.&lt;/P&gt;</description>
    <pubDate>Tue, 01 Sep 2015 19:57:00 GMT</pubDate>
    <dc:creator>Dian_P_</dc:creator>
    <dc:date>2015-09-01T19:57:00Z</dc:date>
    <item>
      <title>[FORTRAN] MKL FFT issues</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057003#M21471</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I am attempting to test my FFT routines with known solution transforms, and the results that I have been getting are not what is expected. &amp;nbsp;In order to maintain generality for my final implementation, the FFTs are being computed as complex-to-complex and out-of-place. &amp;nbsp;The input I have tested is as follows:&lt;/P&gt;

&lt;OL&gt;
	&lt;LI&gt;&lt;STRONG&gt;Forward transform&lt;/STRONG&gt; of an array populated with complex number (1,0). &amp;nbsp;The result should be DiracDelta(w) (up to a constant, anyway), and therefore should have purely real output which is zero everywhere but spiked at w=0. &amp;nbsp;Instead, I get output with a spike in the reals at w=(far left of data set).&lt;/LI&gt;
	&lt;LI&gt;&lt;STRONG&gt;Backward transform&lt;/STRONG&gt; of DiracDelta( w-1.5 ). &amp;nbsp;This should result in (again to a constant) Cos(1.5 t) - iSin(1.5 t). &amp;nbsp;I instead get complex output oscillating with an extremely small period (on the order of w=10^-3 instead of the expected w=1.5) in both real and imaginary domain.&lt;/LI&gt;
	&lt;LI&gt;&lt;STRONG&gt;Backward transform&lt;/STRONG&gt; of a narrow Gaussian, instead of a hard delta spike in #2, just in case the method didn't like that. &amp;nbsp;Got the same results as #2.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;I have been struggling with this issue for a few weeks now, and any help would be greatly appreciated. &amp;nbsp;My codes are attached. &amp;nbsp;The external module bremModule.f90 contains the functions for running the FFTs, while ffttest.f90 contains the input array initialization, function calls, and I/O control.&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:29:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057003#M21471</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-18T15:29:08Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057004#M21472</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt;

&lt;P&gt;Your test&amp;nbsp;fails because of non-zero based arrays.&lt;/P&gt;

&lt;P&gt;Intel MKL supports only zero-based arrays -- please read top of &lt;A href="https://software.intel.com/en-us/node/521955"&gt;https://software.intel.com/en-us/node/521955&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 15:50:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057004#M21472</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-08-18T15:50:52Z</dc:date>
    </item>
    <item>
      <title>I redefined my arrays to be</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057005#M21473</link>
      <description>&lt;P&gt;I redefined my arrays to be zero-based, and am getting the same results as before. &amp;nbsp;New copies of the code are attached.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Aug 2015 17:15:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057005#M21473</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-18T17:15:50Z</dc:date>
    </item>
    <item>
      <title>The following seems to be the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057006#M21474</link>
      <description>&lt;P&gt;Due to the periodic nature of the time domain, the following is the correct way to go from [0,nLength-1] to [-nLength/2,nLength/2-1] in FFTs.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; do j=-nLength/2,nLength/2-1
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(15,*) j*dn,real( nListIn (mod(j+nLength, nLength)) )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(16,*) j*dn,real( nListOut(mod(j+nLength, nLength)) )
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; write(17,*) j*dn,imag( nListOut(mod(j+nLength, nLength)) )
&amp;nbsp;&amp;nbsp;&amp;nbsp; end do
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 14:24:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057006#M21474</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-08-19T14:24:00Z</dc:date>
    </item>
    <item>
      <title>Thanks, that helped move</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057007#M21475</link>
      <description>&lt;P&gt;Thanks, that helped move things in the right direction. &amp;nbsp;Something is still wrong, though. &amp;nbsp;Using the backward transform of input DiracDelta(w-1.5), we would again expect real Cos and negative imaginary Sin of frequency 1.5. &amp;nbsp;The input plots correctly, however, as you can see in the following plot of the results of the transform, the output is incorrect. &amp;nbsp;The frequency is clearly higher than 1.5, and the real (red) and imaginary (blue) parts are almost completely in-phase instead of the expected out-of-phase behavior.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="deltaPlot_0.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7850i8D8536E25FCD7C1B/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="deltaPlot_0.png" alt="deltaPlot_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;This is what it should look like:&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="goodDeltaPlot_0.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7851iE02ADC041FCE81A5/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="goodDeltaPlot_0.png" alt="goodDeltaPlot_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;The up-to-date code is attached.&lt;/P&gt;

&lt;P&gt;Also, on Intel's page of MKL FFT examples (&lt;A href="https://software.intel.com/en-us/node/471390"&gt;link here&lt;/A&gt;), the arrays are shown as being one-based. &amp;nbsp;The FORTRAN standard convention is that "arrayName(length)" gives entries at arrayName(1)...arrayName(length). &amp;nbsp;This seems to contradict what you mentioned about MKL FFTs only supporting zero-based arrays. &amp;nbsp;Could you please clarify this for me?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Aug 2015 15:36:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057007#M21475</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-19T15:36:13Z</dc:date>
    </item>
    <item>
      <title>In order to see in the</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057008#M21476</link>
      <description>&lt;P&gt;In order to see in the picture that real and imaginary parts do have different phase, you need to scale the output. So you should change dcmplx(1.d0/dn,0.0d0) to dcmplx(1.d0,0.0d0), or set backward scale via DFTI explicitly because, by default, Intel MKL FFTs do not scale output; neither forward, nor backward.&lt;/P&gt;

&lt;P&gt;The frequency is higher than 1.5 because ffttest.f90 says "nmax=3.14*10" instead of "nmax=3.14".&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2015 18:29:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057008#M21476</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-08-21T18:29:22Z</dc:date>
    </item>
    <item>
      <title>Thanks for the response</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057009#M21477</link>
      <description>&lt;P&gt;Thanks for the response Evgueni, but I do not understand what you have just told me:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;From what I read about the parameter DFTI_FORWARD_SCALE (&lt;A href="https://software.intel.com/en-us/node/521964#F0B1CE76-A4D1-44CC-AAA1-A61CA85FD0FB"&gt;source&lt;/A&gt;), this has to do with a complete re-scaling of the magnitude of the output of the transform (the 1/(2*pi) factor in the standard FT formulation, for example). &amp;nbsp;What effect would this have on phase, and how?&lt;/LI&gt;
	&lt;LI&gt;In my code, "nmax=3.14*10" is defining the length of the I/O arrays to be 10 cycles of Sin(x). &amp;nbsp;In the case of the Delta input, this just means more zero-valued space on either side of the spike at w=1.5. &amp;nbsp;The location of this spike in w-space is what dictates the period of the oscillations, not the input array's length.&lt;/LI&gt;
	&lt;LI&gt;Also, please still clarify the point on zero- or one-based arrays per my last post.&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2015 19:17:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057009#M21477</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-21T19:17:00Z</dc:date>
    </item>
    <item>
      <title>Without scaling, the size of</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057010#M21478</link>
      <description>&lt;UL&gt;
	&lt;LI&gt;Without scaling, the size of your plot is 0.5 by 2000 units and the phase difference is hard to see because it plots as one pixel or less.&lt;/LI&gt;
	&lt;LI&gt;By definition of discrete Fourier transforms, the input array contains only one cycle.&lt;/LI&gt;
	&lt;LI&gt;In Intel MKL, forward transforms store the coefficient of the zero-frequency harmonic at the smallest memory address in the output array, regardless of the smallest index in the FORTRAN declaration. For academic people, this fact&amp;nbsp;means that Intel MKL supports only zero-based arrays in descrete Fourier transforms -- hence my answer.&lt;/LI&gt;
&lt;/UL&gt;</description>
      <pubDate>Tue, 25 Aug 2015 04:36:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057010#M21478</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-08-25T04:36:04Z</dc:date>
    </item>
    <item>
      <title>Per your suggestions, I</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057011#M21479</link>
      <description>&lt;P&gt;Per your suggestions, I changed the forward/backward scaling each to 1/sqrt(nLength), and changed "nMax=3.14*10" to "nMax=3.14". &amp;nbsp;While scaled down, the output is still scaled a factor of 10 larger than it should be, and the frequency of final oscillations is even higher than it was previously. &amp;nbsp;The phase difference is still not seen on this smaller scale.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="ffttest plot2_0.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7852i3B02CDDEF25AFC21/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="ffttest plot2_0.png" alt="ffttest plot2_0.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Also, I still do not understand what you said about the input array containing only one cycle. &amp;nbsp;In this case, the input array represents a Dirac Delta function. &amp;nbsp;This is not a periodic function, therefore has no defined cyclic period. &amp;nbsp;In general, in my final implementation, I will not know what the input or output arrays "look like". &amp;nbsp;As such, how would I know a priori how long to make my input array such that it is the proper length to be accepted by the MKL DFFT?&lt;/P&gt;</description>
      <pubDate>Tue, 25 Aug 2015 13:24:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057011#M21479</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-25T13:24:33Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057012#M21480</link>
      <description>&lt;P&gt;Hi Andrew,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;The FFT function follow the math formula.&amp;nbsp;fhttps://software.intel.com/en-us/node/521955&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="3AB6CEF8-0A05-4817-96CA-66F20E17E096-imageId=2C50B6C5-009B-4635-8A2A-7CBCF84A7891.gif"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/10232i992FB5F7AC834D94/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="3AB6CEF8-0A05-4817-96CA-66F20E17E096-imageId=2C50B6C5-009B-4635-8A2A-7CBCF84A7891.gif" alt="3AB6CEF8-0A05-4817-96CA-66F20E17E096-imageId=2C50B6C5-009B-4635-8A2A-7CBCF84A7891.gif" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;or&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;&lt;VAR class="varname" style="line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; box-sizing: border-box;"&gt;k&lt;/VAR&gt;&lt;SPAN style="bottom: -0.25em; line-height: 0; font-size: 9.75px; vertical-align: baseline; position: relative; box-sizing: border-box;"&gt;&lt;VAR class="varname" style="line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; box-sizing: border-box;"&gt;l&lt;/VAR&gt;&lt;/SPAN&gt;&amp;nbsp;= 0, ...&amp;nbsp;&lt;VAR class="varname" style="line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; box-sizing: border-box;"&gt;n&lt;/VAR&gt;&lt;SPAN style="bottom: -0.25em; line-height: 0; font-size: 9.75px; vertical-align: baseline; position: relative; box-sizing: border-box;"&gt;&lt;VAR class="varname" style="line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; box-sizing: border-box;"&gt;l&lt;/VAR&gt;&lt;/SPAN&gt;-1 (&lt;/CODE&gt;&lt;VAR class="varname" style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;l&lt;/VAR&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;= 1, ...,&amp;nbsp;&lt;/SPAN&gt;&lt;VAR class="varname" style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;d)&lt;/VAR&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;, where&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="eqsymbol" style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px; box-sizing: border-box;"&gt;σ&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;is a scale factor,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="eqsymbol" style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px; box-sizing: border-box;"&gt;δ&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;= -1 for the forward transform, and&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="eqsymbol" style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px; box-sizing: border-box;"&gt;δ&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;= +1 for the inverse (backward) transform. &amp;nbsp;It is 0-based, may be not align exact with FFT standard formula.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;So you may align your input with the asked input &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;1) Input index: &amp;nbsp;for example, it is 0-based in formula, where fortran array from 1 by default. but change it's define from 0 &amp;nbsp;&lt;/SPAN&gt;nListIn(0:nlength)&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;2) &amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;magnitude&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;The forward transform and backward transform are each associated with a scale factor&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="eqsymbol" style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px; box-sizing: border-box;"&gt;σ&lt;/SPAN&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;of its own having the default value of 1. You can specify the scale factors using one or both of the configuration parameters&lt;/SPAN&gt;&lt;CODE style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;DFTI_FORWARD_SCALE&lt;/CODE&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;and&amp;nbsp;&lt;/SPAN&gt;&lt;CODE style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;DFTI_BACKWARD_SCALE&lt;/CODE&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;. For example, for a one-dimensional transform of length&amp;nbsp;&lt;/SPAN&gt;&lt;VAR class="varname" style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;n&lt;/VAR&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;, you can use the default scale of 1 for the forward transform and set the scale factor for the backward transform to be 1/&lt;/SPAN&gt;&lt;VAR class="varname" style="color: rgb(102, 102, 102); line-height: 1.6em; font-family: &amp;quot;Courier New&amp;quot;, Courier, monospace; font-size: 13px; box-sizing: border-box;"&gt;n&lt;/VAR&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;, thus making the backward transform the inverse of the forward transform.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;so if you want get exact forward array, teh backward scale should be 1/n.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color: rgb(102, 102, 102); line-height: 18.2px; font-family: Arial, Tahoma, Helvetica, sans-serif; font-size: 13px;"&gt;3) about&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="line-height: 18px; font-size: 12px;"&gt;periodic,&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="line-height: 18px; font-size: 12px;"&gt;as math, the FFT is integration. but when calculate as Discrete Fourier Transfrom , the input arrary is limitation. so whatever input is from , &amp;nbsp;we take &amp;nbsp;FFT /IFFT's input is one cycle of one unlimited&amp;nbsp;periodic array. &amp;nbsp;So you may shift the input or output to get what you expect to see.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 06:06:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057012#M21480</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-08-31T06:06:00Z</dc:date>
    </item>
    <item>
      <title>Regarding Ying's responses:</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057013#M21481</link>
      <description>&lt;P&gt;Regarding Ying's responses:&lt;/P&gt;

&lt;P&gt;1) My arrays are defined as zero-based.&lt;/P&gt;

&lt;P&gt;2) My forward and backward scales are each set at 1/sqrt(n). &amp;nbsp;This should give the proper scaling in a forward/backward cycle, but it does not.&lt;/P&gt;

&lt;P&gt;3) I still don't understand how to pick the "one cycle" for the input array when the input is not periodic (such as with the delta function), or in general when you don't know what your input "looks like". &amp;nbsp;What is the highest level generalization of acceptable input length and start point?&lt;/P&gt;

&lt;P&gt;My code is again attached.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Aug 2015 15:45:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057013#M21481</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-08-31T15:45:11Z</dc:date>
    </item>
    <item>
      <title>Andrew,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057014#M21482</link>
      <description>&lt;P&gt;Andrew,&lt;/P&gt;

&lt;P&gt;Regarding the frequency of the Backward Fourier Transform (BFT):&lt;/P&gt;

&lt;P&gt;In your last ffttest.f90, you want to do BFT of DiracDelta(w-1.5).&lt;/P&gt;

&lt;P&gt;First, according to the DFT math formula shown above, the frequency of the result should be 1.5*2π instead of 1.5, which means that the period should be 0.667 instead of 4.19.&lt;/P&gt;

&lt;P&gt;Second, in order to see the correct frequency, you need to write your results as&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    do j=-nLength/2,nLength/2-1
       write(15,*) j/6.28,real( nListIn (mod(j+nLength,nLength)) )
       write(16,*) j/6.28,real( nListOut(mod(j+nLength,nLength)) )
       write(17,*) j/6.28,imag( nListOut(mod(j+nLength,nLength)) )
    end do
&lt;/PRE&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;

&lt;P&gt;If the the real and imaginary part still have the same phase, then I don't know why is that.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Sep 2015 19:57:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057014#M21482</guid>
      <dc:creator>Dian_P_</dc:creator>
      <dc:date>2015-09-01T19:57:00Z</dc:date>
    </item>
    <item>
      <title>Thank you Dian, making that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057015#M21483</link>
      <description>&lt;P&gt;Thank you Dian,&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;making that change does indeed modify the period of the transformed data as you predicted to ~0.667.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;The phase difference and scaling are still off though, so if Evgueni or Ying have any further information about those points it would be appreciated. &amp;nbsp;If you still think that the input array's length has something to do with these issues, please generalize the relationships between input array length and related variables for me.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	- Andrew&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 13:19:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057015#M21483</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-09-02T13:19:21Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057016#M21484</link>
      <description>&lt;P&gt;Hi Andrew,&lt;/P&gt;

&lt;P&gt;Regarding the phase and scaling issue, the main problem seems in the code ffttest.f90&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (j*dn.eq.1.5) then&lt;/P&gt;

&lt;P&gt;It is floating point type. You can't use the eq to compare the&amp;nbsp;&amp;nbsp;floating point&amp;nbsp;number.&lt;/P&gt;

&lt;P&gt;So yu may change them to integer&amp;nbsp;&lt;BR /&gt;
	&amp;nbsp;&amp;nbsp; if (j .eq.1500) then&lt;/P&gt;

&lt;P&gt;or other way to set the DiracDelta(w-1.5).=1 or 1/dn&amp;nbsp;,&amp;nbsp; to see if there are changing on phase.&lt;/P&gt;

&lt;P&gt;Best Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Mon, 14 Sep 2015 03:48:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057016#M21484</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-09-14T03:48:18Z</dc:date>
    </item>
    <item>
      <title>A quick test indicates that</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057017#M21485</link>
      <description>&lt;P&gt;A quick test indicates that my comparison with .eq. is working fine. &amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;In ffttest.f90, I modified the statement in question:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt; if (j*dn.eq.1.5) then
          print*,"j*dn=",j*dn,"=1.5"   &amp;lt;--- added this line
          nListIn(mod(j+nLength,nLength))=dcmplx(1.d0/dn,0.0d0)
...&lt;/PRE&gt;

&lt;P&gt;Then, my .out file contains the new line&lt;/P&gt;

&lt;P&gt;&amp;nbsp;j*dn= &amp;nbsp; 1.50000000000000 &amp;nbsp; &amp;nbsp; &amp;nbsp;=1.5&lt;/P&gt;

&lt;P&gt;Thus, since this is the only new output line, we can see that the numbers are indeed being compared correctly. &amp;nbsp;This is further seen in my previously posted plots of the input data, where the delta spike is clearly visible at 1.5 in omega-space.&lt;/P&gt;

&lt;P&gt;The only time that .eq. would be risky with floating point numbers is if we had to deal with potential round-off errors, but given that I have defined an exact step size this is never an issue that would arise in this code.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 15 Sep 2015 14:16:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057017#M21485</guid>
      <dc:creator>Andrew_V_1</dc:creator>
      <dc:date>2015-09-15T14:16:00Z</dc:date>
    </item>
    <item>
      <title>Hi Andrew, </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057018#M21486</link>
      <description>&lt;P&gt;Hi Andrew,&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Right It is risky to do floating comparing like this, although it may be right in current case. &amp;nbsp;Anyway, please check you input data, and output data.&lt;/P&gt;

&lt;P&gt;for example, &amp;nbsp;let nListIn(6280-1500) = 1 and see the result.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Regards,&lt;/P&gt;

&lt;P&gt;Ying&lt;span class="lia-inline-image-display-wrapper" image-alt="test.png"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/7853iCC5AC4563F70A5AC/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="test.png" alt="test.png" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Sep 2015 02:39:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FORTRAN-MKL-FFT-issues/m-p/1057018#M21486</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-09-16T02:39:00Z</dc:date>
    </item>
  </channel>
</rss>

