<?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 Unexpected DftiComputeForward failures using larger inputs in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179913#M29255</link>
    <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I'm using MKL 2019u3 to compute 3D FFT.&lt;/P&gt;&lt;P&gt;This is the function:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark; wrap-lines:false;"&gt;void CheckMklFFT(const std::string &amp;amp;err_prefix, MKL_LONG status) {
        if (status != 0) {
            std::string error_message(DftiErrorMessage(status));
            std::cerr &amp;lt;&amp;lt; err_prefix + error_message &amp;lt;&amp;lt; std::endl;
            throw std::runtime_error(err_prefix + error_message);
        }
 }

std::shared_ptr&amp;lt;Ipp64fc&amp;gt; FFT3D(float *image, RPP::DataDimensions dims) {

        std::shared_ptr&amp;lt;Ipp64fc&amp;gt; image_fft = std::shared_ptr&amp;lt;Ipp64fc&amp;gt;(ippsMalloc_64fc((dims.x / 2 + 1) * dims.y * dims.z), [](Ipp64fc *x) { ippFree(x); });
        ippsZero_64fc(image_fft.get(), (dims.x / 2 + 1) * dims.x * dims.z);

        long lengths[] = {dims.z, dims.y, dims.x};
        long strides_in[] = {0, dims.x * dims.y, dims.x, 1};
        long strides_out[] = {0, (dims.x / 2 + 1) * dims.y, dims.x / 2 + 1, 1};

        std::string err_prefix = "Error: Failed with FFT due to ";

        // create descriptor
        DFTI_DESCRIPTOR_HANDLE Desc_Handle;
        CheckMklFFT(err_prefix, DftiCreateDescriptor(&amp;amp;Desc_Handle, DFTI_SINGLE, DFTI_REAL, 3, lengths));

        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_PACKED_FORMAT, DFTI_CCE_FORMAT));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_INPUT_STRIDES, strides_in));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_OUTPUT_STRIDES, strides_out));
        CheckMklFFT(err_prefix, DftiCommitDescriptor(Desc_Handle));

        // direct FFT
        CheckMklFFT(err_prefix, DftiComputeForward(Desc_Handle, image, image_fft.get()));

        // Free descriptor
        CheckMklFFT(err_prefix, DftiFreeDescriptor(&amp;amp;Desc_Handle));

        return image_fft;
    }&lt;/PRE&gt;

&lt;P&gt;My problem occurs&amp;nbsp;when I use a very large array (for example, an image with the dimensions of 814x814x814 when each value is&amp;nbsp;float, the size of the array&amp;nbsp;is about 2&lt;SUP&gt;31&lt;/SUP&gt;, when moving to Fourier domain (to complex numbers) the&amp;nbsp;size of the array grows to ~2&lt;SUP&gt;32&lt;/SUP&gt;).&lt;BR /&gt;I compile on&amp;nbsp;Linux system with Intel (R) Xeon (R) CPU E5-4627 v3 @ 2.60GHz processor and add the following flags:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;&amp;nbsp;&amp;nbsp;-DMKL_ILP64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread

However, as soon as I get to DftiComputeForward, an error value returned with the following error message:
Intel MKL DFTI ERROR: Inconsistent configuration parameters.
I've red at the forum that someone was having a similar problem and on MKL 11 updated 5 it fixed, link to the post:&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/345956"&gt;Unexpected DftiCommitDescriptor failures/interactions using larger inputs with MKL 11.1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Anyone know how to deal with the problem?&lt;/P&gt;
&lt;P&gt;Thank you :)&lt;/P&gt;</description>
    <pubDate>Tue, 15 Oct 2019 13:47:29 GMT</pubDate>
    <dc:creator>Cohen__Idan</dc:creator>
    <dc:date>2019-10-15T13:47:29Z</dc:date>
    <item>
      <title>Unexpected DftiComputeForward failures using larger inputs</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179913#M29255</link>
      <description>&lt;P&gt;Hey,&lt;/P&gt;&lt;P&gt;I'm using MKL 2019u3 to compute 3D FFT.&lt;/P&gt;&lt;P&gt;This is the function:&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark; wrap-lines:false;"&gt;void CheckMklFFT(const std::string &amp;amp;err_prefix, MKL_LONG status) {
        if (status != 0) {
            std::string error_message(DftiErrorMessage(status));
            std::cerr &amp;lt;&amp;lt; err_prefix + error_message &amp;lt;&amp;lt; std::endl;
            throw std::runtime_error(err_prefix + error_message);
        }
 }

std::shared_ptr&amp;lt;Ipp64fc&amp;gt; FFT3D(float *image, RPP::DataDimensions dims) {

        std::shared_ptr&amp;lt;Ipp64fc&amp;gt; image_fft = std::shared_ptr&amp;lt;Ipp64fc&amp;gt;(ippsMalloc_64fc((dims.x / 2 + 1) * dims.y * dims.z), [](Ipp64fc *x) { ippFree(x); });
        ippsZero_64fc(image_fft.get(), (dims.x / 2 + 1) * dims.x * dims.z);

        long lengths[] = {dims.z, dims.y, dims.x};
        long strides_in[] = {0, dims.x * dims.y, dims.x, 1};
        long strides_out[] = {0, (dims.x / 2 + 1) * dims.y, dims.x / 2 + 1, 1};

        std::string err_prefix = "Error: Failed with FFT due to ";

        // create descriptor
        DFTI_DESCRIPTOR_HANDLE Desc_Handle;
        CheckMklFFT(err_prefix, DftiCreateDescriptor(&amp;amp;Desc_Handle, DFTI_SINGLE, DFTI_REAL, 3, lengths));

        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_PACKED_FORMAT, DFTI_CCE_FORMAT));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_CONJUGATE_EVEN_STORAGE, DFTI_COMPLEX_COMPLEX));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_INPUT_STRIDES, strides_in));
        CheckMklFFT(err_prefix, DftiSetValue(Desc_Handle, DFTI_OUTPUT_STRIDES, strides_out));
        CheckMklFFT(err_prefix, DftiCommitDescriptor(Desc_Handle));

        // direct FFT
        CheckMklFFT(err_prefix, DftiComputeForward(Desc_Handle, image, image_fft.get()));

        // Free descriptor
        CheckMklFFT(err_prefix, DftiFreeDescriptor(&amp;amp;Desc_Handle));

        return image_fft;
    }&lt;/PRE&gt;

&lt;P&gt;My problem occurs&amp;nbsp;when I use a very large array (for example, an image with the dimensions of 814x814x814 when each value is&amp;nbsp;float, the size of the array&amp;nbsp;is about 2&lt;SUP&gt;31&lt;/SUP&gt;, when moving to Fourier domain (to complex numbers) the&amp;nbsp;size of the array grows to ~2&lt;SUP&gt;32&lt;/SUP&gt;).&lt;BR /&gt;I compile on&amp;nbsp;Linux system with Intel (R) Xeon (R) CPU E5-4627 v3 @ 2.60GHz processor and add the following flags:&lt;/P&gt;

&lt;PRE class="brush:; class-name:dark;"&gt;&amp;nbsp;&amp;nbsp;-DMKL_ILP64 -lmkl_intel_ilp64 -lmkl_core -lmkl_intel_thread

However, as soon as I get to DftiComputeForward, an error value returned with the following error message:
Intel MKL DFTI ERROR: Inconsistent configuration parameters.
I've red at the forum that someone was having a similar problem and on MKL 11 updated 5 it fixed, link to the post:&lt;/PRE&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/345956"&gt;Unexpected DftiCommitDescriptor failures/interactions using larger inputs with MKL 11.1&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Anyone know how to deal with the problem?&lt;/P&gt;
&lt;P&gt;Thank you :)&lt;/P&gt;</description>
      <pubDate>Tue, 15 Oct 2019 13:47:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179913#M29255</guid>
      <dc:creator>Cohen__Idan</dc:creator>
      <dc:date>2019-10-15T13:47:29Z</dc:date>
    </item>
    <item>
      <title>I've found the problem.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179914#M29256</link>
      <description>&lt;P&gt;I've found the problem.&lt;/P&gt;&lt;P&gt;When I allocate memory I use&amp;nbsp;ippsMalloc_64fc, but this allocation allocate memory for blocks of 32-bit length, and the blocks that I use are bigger, so the memory should be allocated by&amp;nbsp;ippsMalloc_64fc_L.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 07:29:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179914#M29256</guid>
      <dc:creator>Cohen__Idan</dc:creator>
      <dc:date>2019-10-17T07:29:26Z</dc:date>
    </item>
    <item>
      <title>thanks for the update. that's</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179915#M29257</link>
      <description>&lt;P&gt;thanks for the update. that's true, for work with 64-bit object sizes, IPP suggest to use&amp;nbsp;platform-aware&amp;nbsp; API&lt;/P&gt;</description>
      <pubDate>Thu, 17 Oct 2019 08:11:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Unexpected-DftiComputeForward-failures-using-larger-inputs/m-p/1179915#M29257</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2019-10-17T08:11:39Z</dc:date>
    </item>
  </channel>
</rss>

