<?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 make sense to address this in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-DftiCommitDescriptor-error-in-dll/m-p/1172860#M28710</link>
    <description>&lt;P&gt;make sense to address this question to the python forum -&amp;nbsp;https://software.intel.com/en-us/forums/intel-distribution-for-python&lt;/P&gt;</description>
    <pubDate>Mon, 20 Jan 2020 05:40:00 GMT</pubDate>
    <dc:creator>Gennady_F_Intel</dc:creator>
    <dc:date>2020-01-20T05:40:00Z</dc:date>
    <item>
      <title>FFT, DftiCommitDescriptor error in dll</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-DftiCommitDescriptor-error-in-dll/m-p/1172859#M28709</link>
      <description>&lt;P&gt;Hi! I'm coding my own dll in C++ language and&amp;nbsp;tried to use FFT from MKL in my dll and got an error.&lt;/P&gt;&lt;P&gt;I'm using Win7, VS2019 and mkl 2019.5.281,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I run&amp;nbsp;official one-dimensional In-place FFT example (https://software.intel.com/en-us/node/522290) in c++ console application and&amp;nbsp;it worked&amp;nbsp;perfectly.&lt;/P&gt;&lt;P&gt;Then, i tried to do FFT by calling the c++ function( with no input parametrs and with&amp;nbsp;the same example code) from python by ctypes library, but it didn't work, so i checked output parametrs of functions and defined an error.&lt;/P&gt;&lt;P&gt;The output status of&amp;nbsp;DftiCommitDescriptor(descriptor) is equal to 5. Here it is an error message - "Intel MKL DFTI ERROR: Descriptor is uncommitted or corrupted".&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could please help me to fix this problem? Thanks in advance.&lt;/P&gt;
&lt;PRE class="brush:cpp; class-name:dark;"&gt;void my(std::vector&amp;lt;std::complex&amp;lt;float&amp;gt;&amp;gt;&amp;amp; in)
{
	DFTI_DESCRIPTOR_HANDLE descriptor;
	MKL_LONG status;

	// Here everything is fine
    status = DftiCreateDescriptor(&amp;amp;descriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, in.size()); //Specify size and precision
	if (status &amp;amp;&amp;amp; !DftiErrorClass(status, DFTI_NO_ERROR))
	{
		printf("Error: %s\n", DftiErrorMessage(status));
	}
    // Error here
	status = DftiCommitDescriptor(descriptor);
	if (status &amp;amp;&amp;amp; !DftiErrorClass(status, DFTI_NO_ERROR))
	{
		printf("Error: %s\n", DftiErrorMessage(status));
	}
	status = DftiComputeForward(descriptor, in.data());
	status = DftiFreeDescriptor(&amp;amp;descriptor);
}

// extern c++ function, it's called by a function from python
void cpp()
{
	std::vector&amp;lt;float&amp;gt; v = { 1.1, 2.1, 3.5, 4.2 };
    std::vector&amp;lt;std::complex&amp;lt;float&amp;gt;&amp;gt; in(v.size());
	std::copy(in.begin(), in.end(), v.begin());
	my(in);
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp; class-name:dark;"&gt;// .h file
#pragma once
#include &amp;lt;iostream&amp;gt;
#include &amp;lt;vector&amp;gt;
#include &amp;lt;complex&amp;gt;
#include "mkl_dfti.h"

#ifdef DETERMINISTIC_EXPORTS
#define DLL_API __declspec(dllexport)
#else
#define DLL_API __declspec(dllimport)
#endif

extern "C" DLL_API void cpp();
std::vector&amp;lt;std::complex&amp;lt;float&amp;gt;&amp;gt; fft_real(std::vector&amp;lt;float&amp;gt;&amp;amp; in_real);
std::vector&amp;lt;std::complex&amp;lt;float&amp;gt;&amp;gt; fft_complex(std::vector&amp;lt;std::complex&amp;lt;float&amp;gt;&amp;gt;&amp;amp; in);&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 07:56:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-DftiCommitDescriptor-error-in-dll/m-p/1172859#M28709</guid>
      <dc:creator>mehnov__pasha</dc:creator>
      <dc:date>2020-01-16T07:56:29Z</dc:date>
    </item>
    <item>
      <title>make sense to address this</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-DftiCommitDescriptor-error-in-dll/m-p/1172860#M28710</link>
      <description>&lt;P&gt;make sense to address this question to the python forum -&amp;nbsp;https://software.intel.com/en-us/forums/intel-distribution-for-python&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 05:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-DftiCommitDescriptor-error-in-dll/m-p/1172860#M28710</guid>
      <dc:creator>Gennady_F_Intel</dc:creator>
      <dc:date>2020-01-20T05:40:00Z</dc:date>
    </item>
  </channel>
</rss>

