<?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 memory leakage using fft and MKL_FreeBuffers in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871561#M8549</link>
    <description>&lt;P&gt;Dear Board!&lt;/P&gt;
&lt;P&gt;I know that there have been several posts here about this topic, but I wonder how you can properly search for memory leaks in your own code if the debugger reports masses of memory leaks in the MKL?&lt;/P&gt;
&lt;P&gt;I am using the MKL to compute a simple FFT, using&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiCreateDescriptor&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiCommitDescriptor&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiComputeForward&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiComputeBackward&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;Then I use the&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;P&gt;Status = DftiFreeDescriptor(&amp;amp;Desc_Handle);&lt;/P&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Times New Roman"&gt;and&lt;/FONT&gt;&lt;/PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;P&gt;MKL_FreeBuffers();&lt;/P&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;
&lt;P&gt;functions.&lt;/P&gt;
&lt;P&gt;Even if you say that everything is fine (speed reasons, whatever) with your leaks, they would completely cover my own leaks, since I am also used to not having any leaks, and if so, to try to eliminate them.&lt;/P&gt;
&lt;P&gt;I am grateful for any suggestions!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jan 2008 13:40:08 GMT</pubDate>
    <dc:creator>andipandi</dc:creator>
    <dc:date>2008-01-03T13:40:08Z</dc:date>
    <item>
      <title>memory leakage using fft and MKL_FreeBuffers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871561#M8549</link>
      <description>&lt;P&gt;Dear Board!&lt;/P&gt;
&lt;P&gt;I know that there have been several posts here about this topic, but I wonder how you can properly search for memory leaks in your own code if the debugger reports masses of memory leaks in the MKL?&lt;/P&gt;
&lt;P&gt;I am using the MKL to compute a simple FFT, using&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiCreateDescriptor&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiCommitDescriptor&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiComputeForward&lt;/P&gt;&lt;FONT size="2"&gt;
&lt;P&gt;DftiComputeBackward&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;
&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;Then I use the&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;P&gt;Status = DftiFreeDescriptor(&amp;amp;Desc_Handle);&lt;/P&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;PRE&gt;&lt;FONT face="Times New Roman"&gt;and&lt;/FONT&gt;&lt;/PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;PRE&gt;&lt;FONT size="2"&gt;&lt;P&gt;MKL_FreeBuffers();&lt;/P&gt;&lt;/FONT&gt;&lt;/PRE&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;
&lt;P&gt;functions.&lt;/P&gt;
&lt;P&gt;Even if you say that everything is fine (speed reasons, whatever) with your leaks, they would completely cover my own leaks, since I am also used to not having any leaks, and if so, to try to eliminate them.&lt;/P&gt;
&lt;P&gt;I am grateful for any suggestions!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jan 2008 13:40:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871561#M8549</guid>
      <dc:creator>andipandi</dc:creator>
      <dc:date>2008-01-03T13:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: memory leakage using fft and MKL_FreeBuffers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871562#M8550</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;Thank you for the important question! MKL shouldn't have memory leaks after MKL_FreeBuffers() in case of the correct usage.&lt;BR /&gt;As I can see, your code is correct in common. So, to investigate the problem I need more detailed info.&lt;/P&gt;
&lt;P&gt;Which MKL version do you use? If it's possible, please run MKL example from the directory example/versionquery in your MKL package.&lt;BR /&gt;Use one of commands:&lt;BR /&gt;&amp;gt;nmake lib32 | dll32 | libem64t | dllem64t | lib64 | dll64 on Windows&lt;BR /&gt;&amp;gt;make lib32 | so32 | libem64t | soem64t | lib64 | so64 on Linux&lt;BR /&gt;depending on your system and type of MKL - static or dynamic. The results can be found in the directory example/versionquery/_results.&lt;/P&gt;
&lt;P&gt;Can you give us your exact testcase with the linker command line (or MS project) which demonstrate memory leaks in MKL?&lt;/P&gt;
&lt;P&gt;Many thanks,&lt;BR /&gt;Vladimir&lt;BR /&gt;MKL library engineering&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jan 2008 15:47:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871562#M8550</guid>
      <dc:creator>Vladimir_Lunev</dc:creator>
      <dc:date>2008-01-06T15:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: memory leakage using fft and MKL_FreeBuffers</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871563#M8551</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;Thx for your reply!&lt;/P&gt;
&lt;P&gt;I am using MKL 10.0.0.15.&lt;/P&gt;
&lt;P&gt;I tried making a small sample project to show the problem to you, and to my surprise found out that there were no mem leaks.&lt;/P&gt;
&lt;P&gt;Then I proceeded to change my original project (MKL is statically linked to a .dll which is used by another .exe program), and noticed that the problem comes with an exit(0) that comes right after doing the FFT (I was debugging the function and added a call to it in the startup-routine of the program, and in order not to spend too much time or even mix this code into release code :) I added the exit(0); in order to notice straight away.&lt;/P&gt;
&lt;P&gt;Anyhow, this seems to cause the problem (also, with the exit(0) and no fft, there are no mem leaks). I don't really plan on using the exit(0) in a later version, so the problem is actually no problem for me any more, maybe for you if you want to do some more testing on this.&lt;/P&gt;
&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jan 2008 08:42:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-using-fft-and-MKL-FreeBuffers/m-p/871563#M8551</guid>
      <dc:creator>andipandi</dc:creator>
      <dc:date>2008-01-08T08:42:20Z</dc:date>
    </item>
  </channel>
</rss>

