<?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 Hi Marcos A. in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068493#M22071</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/1270894" style="font-size: 11px; line-height: 16.5px; background-color: rgb(238, 238, 238);"&gt;Marcos A.&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I can reproduce the problem with your &amp;nbsp;guide. &amp;nbsp;I get access violation error.&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;It is unexpected.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;But what I want to comment is about the &lt;STRONG&gt;quick link model: &lt;/STRONG&gt;&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Fortran&amp;gt;Libraries&amp;gt;Use Intel MKL: Parallel (/Qmkl:parallel) &amp;nbsp;, it is actually equivalent to "&amp;nbsp;mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib. when&amp;nbsp;Runtime Library:&amp;nbsp;Multithread DLL (/libs:dll /threads)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;and &lt;STRONG&gt;&amp;nbsp;manual &amp;nbsp;way&lt;/STRONG&gt;, to &amp;nbsp;add&amp;nbsp;&amp;nbsp;mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib. to&amp;nbsp;Linker&amp;gt;Input&amp;gt;Additional Dependencies.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;The two kind of link ways, dynamic and static respectively conflict each other . &amp;nbsp;By default, one of them should be enough. (excepted&amp;nbsp;mkl_blas95_lp64.lib mkl_lapack95_lp64.lib). &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; line-height: 19.512px;"&gt;&amp;nbsp;the mixed result are unknowable. so&amp;nbsp;you can select &amp;nbsp;either manual way or quick link way to workaround the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Regarding the&amp;nbsp;mkl_dfti.f90, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;you can add it like below&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;include 'mkl_dfti.f90'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; program fft_test&lt;/P&gt;

&lt;P&gt;Intel fortran Compiler should be able to find it and compile it.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 18 Nov 2015 05:20:00 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2015-11-18T05:20:00Z</dc:date>
    <item>
      <title>FFT error - DftiFreeDescriptor / DftiCommitDescriptor (Fortran)</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068489#M22067</link>
      <description>&lt;P&gt;I'm having an error using the&amp;nbsp;DftiFreeDescriptor command on the FFT computation. I'm using Intel Parallel Studio XE Cluster Edition (2016 - Student download) with Visual Studio Community 2015. And here is the code:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;seqc = CMPLX(seq)
Status1 = DftiCreateDescriptor(My_Desc2_Handle, DFTI_DOUBLE, DFTI_COMPLEX, 1, npts)
Status1 = DftiCommitDescriptor(My_Desc2_Handle)
Status1 = DftiComputeForward(My_Desc2_Handle, seqc)
Status1 = DftiFreeDescriptor(My_Desc2_Handle)&lt;/PRE&gt;

&lt;P&gt;I start with this real(8)::seq(npts) and convert it to the complex seqc(npts), where npts is something between 2000 and 6000.&lt;/P&gt;

&lt;P&gt;Debuging each step I have the following values for Status1 &amp;nbsp;and My_Desc2_Handle:&lt;/P&gt;

&lt;P&gt;Status1 = 0 / My_Desc2_Handle: Undefined address&lt;/P&gt;

&lt;PRE class="brush:fortran;" style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = DftiCreateDescriptor(My_Desc2_Handle, DFTI_DOUBLE, DFTI_COMPLEX, 1, npts)&lt;/PRE&gt;

&lt;P&gt;Status1 = 0 /&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;My_Desc2_Handle = 0&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;" style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = DftiCommitDescriptor(My_Desc2_Handle)&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = 0 /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;My_Desc2_Handle = -620492544&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;" style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = DftiComputeForward(My_Desc2_Handle, seqc)&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = 0 /&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;My_Desc2_Handle = -620492544&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:fortran;" style="font-size: 13.008px; line-height: 19.512px;"&gt;Status1 = DftiFreeDescriptor(My_Desc2_Handle)&lt;/PRE&gt;

&lt;P&gt;Error, where in the output i get this:&amp;nbsp;&amp;nbsp;Invalid address specified to RtlValidateHeap( 0000000011FA0000, 0000000014312970 )&lt;/P&gt;

&lt;P&gt;So, I've tested changing npts to values around 100, than My_desc2_Handle receives a positive value and I don't get errors with the DftiFreeDescriptor command. But if I put it up to 200, My_Desc2_Handle gets negative and the error happens again. So I guess it is something with the DftiCommitDescriptor, where it can't allocate/address the memory correctly. If I don't add the DftiFreeDescriptor command, I just get my FFT normaly, but I'm not sure if the memory is leaking each time I run it.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2015 20:41:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068489#M22067</guid>
      <dc:creator>Marcos_A_2</dc:creator>
      <dc:date>2015-11-15T20:41:09Z</dc:date>
    </item>
    <item>
      <title>I changed in Project &gt;</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068490#M22068</link>
      <description>&lt;P&gt;I changed in&amp;nbsp;Project &amp;gt; &amp;nbsp;Fortran &amp;gt; Libraries &amp;gt; Runtime Library from Multithread DLL to Multithreaded and that error stopped from happening. I don't know why. So maybe it's a fix for the developers.&lt;/P&gt;

&lt;P&gt;I have the MKL settings as:&amp;nbsp;Parallel (/Qmkl:parallel). But with the multithreaded option, apparently it is using only one core on the MKL functions checking the Diagnostic Tools/CPU utilization window.&lt;/P&gt;</description>
      <pubDate>Sun, 15 Nov 2015 21:09:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068490#M22068</guid>
      <dc:creator>Marcos_A_2</dc:creator>
      <dc:date>2015-11-15T21:09:00Z</dc:date>
    </item>
    <item>
      <title>Hi Marcos,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068491#M22069</link>
      <description>&lt;P&gt;Hi Marcos,&lt;/P&gt;

&lt;P&gt;We expect MKL to be compatible with MSVS 2015.&lt;/P&gt;

&lt;P&gt;Could you post here a small reproducer including the compile and link line?&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
      <pubDate>Mon, 16 Nov 2015 06:12:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068491#M22069</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-11-16T06:12:00Z</dc:date>
    </item>
    <item>
      <title>So, here is the deal, I made</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068492#M22070</link>
      <description>&lt;P&gt;So, here is the deal, I made a short code with the problematic functions:&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    program fft_test

    use MKL_DFTI
    implicit none
    real(8)::seq(3000)
    double complex::seqc(3000)
    type(DFTI_DESCRIPTOR),POINTER::My_Desc2_Handle
    integer::Status1
    integer::i
    
    seqc=0.0d0
    Status1=0
    
    do i=1,3000
        seq(i)=1.0d0*i
    end do
    
    seqc = CMPLX(seq)
    Status1 = DftiCreateDescriptor(My_Desc2_Handle, DFTI_DOUBLE, DFTI_COMPLEX, 1, 3000)
    Status1 = DftiCommitDescriptor(My_Desc2_Handle)
    Status1 = DftiComputeForward(My_Desc2_Handle, seqc)
    Status1 = DftiFreeDescriptor(My_Desc2_Handle)
   
    end program fft_test&lt;/PRE&gt;

&lt;P&gt;And I made the same changes in its proprieties as I have in my original project. So going to Project &amp;gt; Proprieties I have the following:&lt;/P&gt;

&lt;P&gt;Fortran&amp;gt;Optimization:&amp;nbsp;Maximize Speed plus Higher Level Optimizations (/O3)&lt;/P&gt;

&lt;P&gt;Fortran&amp;gt;Libraries&amp;gt;Runtime Library:&amp;nbsp;Multithread DLL (/libs:dll /threads) (As I told you previously, if I change it to Multithreaded the error doesn't occur)&lt;/P&gt;

&lt;P&gt;Fortran&amp;gt;Libraries&amp;gt;Use Intel MKL: Parallel (/Qmkl:parallel)&lt;/P&gt;

&lt;P&gt;Linker&amp;gt;Input&amp;gt;Additional Dependencies:&amp;nbsp;mkl_blas95_lp64.lib mkl_lapack95_lp64.lib mkl_intel_lp64.lib mkl_sequential.lib&amp;nbsp;mkl_core.lib&lt;/P&gt;

&lt;P&gt;So, I found out that everything runs fine if I remove&amp;nbsp;mkl_core.lib from the linker. I can use even the Multithread DLL option wihtout problems. I don't understand very well which .lib's I should add there, but well.. it is running now.&lt;/P&gt;

&lt;P&gt;Just to add to developers, when I run the problematic code (with mkl_core.lib) in Release mode, I received the following error:&amp;nbsp;Critical error detected c0000374&lt;/P&gt;

&lt;P&gt;Here's the command Line for Fortran options for my original project:&amp;nbsp;&lt;/P&gt;

&lt;P&gt;/nologo /O3 /module:"x64\Release\\" /object:"x64\Release\\" /Fd"x64\Release\vc140.pdb" /libs:dll /threads /Qmkl:parallel /c&lt;/P&gt;

&lt;P&gt;And for the Linker:&lt;/P&gt;

&lt;P&gt;/OUT:"x64\Release\FSDT.exe" /INCREMENTAL:NO /NOLOGO /MANIFEST /MANIFESTFILE:"x64\Release\FSDT.exe.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /SUBSYSTEM:CONSOLE /IMPLIB:"E:\Doutorado\fortran\FSDT\FSDT\x64\Release\FSDT.lib" mkl_blas95_lp64.lib mkl_lapack95_lp64.lib mkl_intel_lp64.lib mkl_sequential.lib&lt;/P&gt;

&lt;P&gt;An extra question if anyone read all that post until the end: In the code I posted here I use the command USE MKL_DFTI and I add the file mkl_dfti.f90 from the folder&amp;nbsp;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2016.0.110\windows\mkl\include into my project. Is there a way to type the command USE and make the compiler know the path without needing to add the .f90 by myself?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 17 Nov 2015 20:40:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068492#M22070</guid>
      <dc:creator>Marcos_A_2</dc:creator>
      <dc:date>2015-11-17T20:40:00Z</dc:date>
    </item>
    <item>
      <title>Hi Marcos A.</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068493#M22071</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://software.intel.com/en-us/user/1270894" style="font-size: 11px; line-height: 16.5px; background-color: rgb(238, 238, 238);"&gt;Marcos A.&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;I can reproduce the problem with your &amp;nbsp;guide. &amp;nbsp;I get access violation error.&amp;nbsp;&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;&amp;nbsp;It is unexpected.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;But what I want to comment is about the &lt;STRONG&gt;quick link model: &lt;/STRONG&gt;&amp;nbsp;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Fortran&amp;gt;Libraries&amp;gt;Use Intel MKL: Parallel (/Qmkl:parallel) &amp;nbsp;, it is actually equivalent to "&amp;nbsp;mkl_intel_lp64_dll.lib mkl_intel_thread_dll.lib mkl_core_dll.lib. when&amp;nbsp;Runtime Library:&amp;nbsp;Multithread DLL (/libs:dll /threads)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;and &lt;STRONG&gt;&amp;nbsp;manual &amp;nbsp;way&lt;/STRONG&gt;, to &amp;nbsp;add&amp;nbsp;&amp;nbsp;mkl_intel_lp64.lib mkl_sequential.lib mkl_core.lib. to&amp;nbsp;Linker&amp;gt;Input&amp;gt;Additional Dependencies.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;The two kind of link ways, dynamic and static respectively conflict each other . &amp;nbsp;By default, one of them should be enough. (excepted&amp;nbsp;mkl_blas95_lp64.lib mkl_lapack95_lp64.lib). &lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; line-height: 19.512px;"&gt;&amp;nbsp;the mixed result are unknowable. so&amp;nbsp;you can select &amp;nbsp;either manual way or quick link way to workaround the problem.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Regarding the&amp;nbsp;mkl_dfti.f90, &amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;you can add it like below&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;include 'mkl_dfti.f90'&lt;BR /&gt;
	&amp;nbsp; &amp;nbsp; program fft_test&lt;/P&gt;

&lt;P&gt;Intel fortran Compiler should be able to find it and compile it.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Best Regards&lt;/P&gt;

&lt;P&gt;Ying&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 05:20:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068493#M22071</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2015-11-18T05:20:00Z</dc:date>
    </item>
    <item>
      <title>Marcos, according to MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068494#M22072</link>
      <description>&lt;P&gt;Marcos, according to &lt;A href="https://software.intel.com/en-us/node/528511"&gt;MKL linking model&lt;/A&gt;, you should use either the /Qmkl compiler switch or the explicit list of MKL libraries, not both.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Nov 2015 09:59:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068494#M22072</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2015-11-18T09:59:00Z</dc:date>
    </item>
    <item>
      <title>Thank you all very much for</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068495#M22073</link>
      <description>&lt;P&gt;Thank you all very much for the help!&lt;/P&gt;</description>
      <pubDate>Thu, 19 Nov 2015 12:35:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/FFT-error-DftiFreeDescriptor-DftiCommitDescriptor-Fortran/m-p/1068495#M22073</guid>
      <dc:creator>Marcos_A_2</dc:creator>
      <dc:date>2015-11-19T12:35:27Z</dc:date>
    </item>
  </channel>
</rss>

