<?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: Multi-dimensional FFTs in Fortran using allocatable arrays in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880006#M9428</link>
    <description>&lt;BR /&gt;Chambes,&lt;BR /&gt;&lt;BR /&gt;That half of the 3D matrix remained unchanged may indicatemis-typedarray (real vs complex) and a version of MKL older than MKL 10.1 Update 1. Could you check what type of transform you do and what MKL version do you use?&lt;BR /&gt;&lt;BR /&gt;I see that RESHAPE can do the job, and I agree it better be avoided for memory saving reason. Fortunately, the MKL interface to FFTs allows to describe nearly anypossible layout of the data, not necessarily contiguous. The layout should be properly set via DFTI_INPUT_STRIDES/DFTI_OUTPUT_STRIDES.&lt;BR /&gt;&lt;BR /&gt;For the workaround of a previous postto apply, the reference passed to DftiCompute should point to the actual data and the descriptor should properly describe the layout of the data.&lt;BR /&gt;&lt;BR /&gt;Simple example (256x256x256 complex-to-complex transform, in-place):&lt;BR /&gt;&lt;BR /&gt; complex, allocatable :: X(:,:,:)&lt;BR /&gt; allocate( X( 300, 400, 500) ) ! reservemore space than needed, for illustration&lt;BR /&gt; status = DftiCreateDescriptor(hand, DFTI_SINGLE, DFTI_COMPLEX, 3, (/256,256,256/)) &lt;BR /&gt; status = DftiSetValue(hand, DFTI_INPUT_STRIDES, (/0,1,300,300*400/))&lt;BR /&gt; status = DftiCommitDescriptor(hand)&lt;BR /&gt;! Input is X(i,j,k) where i,j,k are all in the range 1...256&lt;BR /&gt; status = DftiComputeForward(hand, X(:,1,1))&lt;BR /&gt;! Nowoutput is X(i,j,k) where i,j,kin the range 1...256&lt;BR /&gt;&lt;BR /&gt;Dima&lt;BR /&gt;</description>
    <pubDate>Tue, 16 Jun 2009 03:42:01 GMT</pubDate>
    <dc:creator>Dmitry_B_Intel</dc:creator>
    <dc:date>2009-06-16T03:42:01Z</dc:date>
    <item>
      <title>Multi-dimensional FFTs in Fortran using allocatable arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880003#M9425</link>
      <description>The MKL DFTI uses 1-D arrays for the computation and suggests using the EQUIVALENCE statement to transform a multi-dimensional array into a 1-D array to pass to the DFTI functions. &lt;BR /&gt;&lt;BR /&gt;How can one do a multi-dimensional FFT using MKL_DFTI on an allocatable array since an allocatable array cannot be used with the EQUIVALENCE statement?</description>
      <pubDate>Mon, 15 Jun 2009 14:29:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880003#M9425</guid>
      <dc:creator>chambes</dc:creator>
      <dc:date>2009-06-15T14:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-dimensional FFTs in Fortran using allocatable arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880004#M9426</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Hi chambes,&lt;BR /&gt;&lt;BR /&gt;You are right, EQUIVALNCE cannot be used to pass mD-arrays to DftiCompute functions if the arrays are allocatable or dummy arguments to the function/subroutine. A workaround to this problem is to pass the 1st column as1D subarray. AssumingX is declared as&lt;BR /&gt;&lt;BR /&gt; real :: x(:,:,:)&lt;BR /&gt;&lt;BR /&gt;(it can be a dummy argument or an allocatable array), the followingusewill work in many cases:&lt;BR /&gt;&lt;BR /&gt;status = DftiComputeForward(hand, x(:,1,1))&lt;BR /&gt;&lt;BR /&gt;Dima&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jun 2009 15:02:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880004#M9426</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2009-06-15T15:02:49Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-dimensional FFTs in Fortran using allocatable arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880005#M9427</link>
      <description>&lt;DIV style="margin: 0px; height: auto;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;That compiled without error, but the resulting FT was not correct. It looked like half of the 3D matrix was unchanged, while the other half had a version of the FT'ed data. I am running a rather large 3D FFT (256x256x256). It works fine if I allocate a 1D array and assign it using the RESHAPE command, but I would like to avoid increasing my memory use like that. Your method assumes the data is contiguous across the whole array - is that always correct?&lt;BR /&gt;&lt;BR /&gt;Thanks for your help!&lt;BR /&gt;</description>
      <pubDate>Mon, 15 Jun 2009 17:16:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880005#M9427</guid>
      <dc:creator>chambes</dc:creator>
      <dc:date>2009-06-15T17:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-dimensional FFTs in Fortran using allocatable arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880006#M9428</link>
      <description>&lt;BR /&gt;Chambes,&lt;BR /&gt;&lt;BR /&gt;That half of the 3D matrix remained unchanged may indicatemis-typedarray (real vs complex) and a version of MKL older than MKL 10.1 Update 1. Could you check what type of transform you do and what MKL version do you use?&lt;BR /&gt;&lt;BR /&gt;I see that RESHAPE can do the job, and I agree it better be avoided for memory saving reason. Fortunately, the MKL interface to FFTs allows to describe nearly anypossible layout of the data, not necessarily contiguous. The layout should be properly set via DFTI_INPUT_STRIDES/DFTI_OUTPUT_STRIDES.&lt;BR /&gt;&lt;BR /&gt;For the workaround of a previous postto apply, the reference passed to DftiCompute should point to the actual data and the descriptor should properly describe the layout of the data.&lt;BR /&gt;&lt;BR /&gt;Simple example (256x256x256 complex-to-complex transform, in-place):&lt;BR /&gt;&lt;BR /&gt; complex, allocatable :: X(:,:,:)&lt;BR /&gt; allocate( X( 300, 400, 500) ) ! reservemore space than needed, for illustration&lt;BR /&gt; status = DftiCreateDescriptor(hand, DFTI_SINGLE, DFTI_COMPLEX, 3, (/256,256,256/)) &lt;BR /&gt; status = DftiSetValue(hand, DFTI_INPUT_STRIDES, (/0,1,300,300*400/))&lt;BR /&gt; status = DftiCommitDescriptor(hand)&lt;BR /&gt;! Input is X(i,j,k) where i,j,k are all in the range 1...256&lt;BR /&gt; status = DftiComputeForward(hand, X(:,1,1))&lt;BR /&gt;! Nowoutput is X(i,j,k) where i,j,kin the range 1...256&lt;BR /&gt;&lt;BR /&gt;Dima&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jun 2009 03:42:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880006#M9428</guid>
      <dc:creator>Dmitry_B_Intel</dc:creator>
      <dc:date>2009-06-16T03:42:01Z</dc:date>
    </item>
    <item>
      <title>Re: Multi-dimensional FFTs in Fortran using allocatable arrays</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880007#M9429</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
It works after setting DFTI_INPUT_STRIDES. Thanks!&lt;BR /&gt;</description>
      <pubDate>Tue, 16 Jun 2009 16:34:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Multi-dimensional-FFTs-in-Fortran-using-allocatable-arrays/m-p/880007#M9429</guid>
      <dc:creator>chambes</dc:creator>
      <dc:date>2009-06-16T16:34:42Z</dc:date>
    </item>
  </channel>
</rss>

