<?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 Pardiso - memory leak? in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-leak/m-p/772167#M724</link>
    <description>Hi,&lt;BR /&gt;&lt;BR /&gt;MKL function &lt;STRONG&gt;mkl_free_buffers()&lt;/STRONG&gt; releases all memory which is taken by MKL memory manager software and already maked as free but can be used in the future. As to PARDISO-memory, it needs explicitly free such memory.</description>
    <pubDate>Mon, 15 Aug 2011 05:07:51 GMT</pubDate>
    <dc:creator>barragan_villanueva_</dc:creator>
    <dc:date>2011-08-15T05:07:51Z</dc:date>
    <item>
      <title>Pardiso - memory leak?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-leak/m-p/772166#M723</link>
      <description>Hello,&lt;BR /&gt;I have some troubles with Pardiso, it uses my whole memory (8 GB) and swaps data to my HDD. I have tried to use&lt;BR /&gt;&lt;PRE&gt;[cpp]mkl_free_buffers();[/cpp]&lt;/PRE&gt; with no success. My code now basically looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[cpp]AllocatedBytes = mkl_mem_stat(&amp;amp;N_AllocatedBuffers);
printf("\nusing %ld bytes in %d buffers\n",(long)AllocatedBytes,N_AllocatedBuffers);

//calling pardiso
pardiso( pt , &amp;amp; maxfct , &amp;amp; mnum , &amp;amp; mtype , &amp;amp; phase , &amp;amp;n , a , ia , ja , perm , &amp;amp; nrhs, iparm , &amp;amp; msglvl , y , sol , &amp;amp; error );

AllocatedBytes = mkl_mem_stat(&amp;amp;N_AllocatedBuffers);
printf("\nusing %ld bytes in %d buffers\n",(long)AllocatedBytes,N_AllocatedBuffers);

mkl_free_buffers();

AllocatedBytes = mkl_mem_stat(&amp;amp;N_AllocatedBuffers);
printf("\nusing %ld bytes in %d buffers\n",(long)AllocatedBytes,N_AllocatedBuffers);[/cpp]&lt;/PRE&gt; &lt;BR /&gt;Pardiso solves my problem fine but the output of the program is:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]using 524352 bytes in 1 buffers
.
.//some pardiso output, seems to work fine
.

//before mkl_free_buffers();
using 1428469361 bytes in 126 buffers

//after mkl_free_buffers();
using 1411149489 bytes in 116 buffers
[/bash]&lt;/PRE&gt; The thing is that I use Pardiso in a loop, so it solves different kind of problems - but after the fifth run I'm out of memory and the swapping begins.&lt;BR /&gt;Can anybody help me with that?&lt;BR /&gt;Thanks,&lt;BR /&gt;matse&lt;BR /&gt;&lt;BR /&gt;//Edit: OK, I just read that setting the Pardiso parameter "phase" to "-1" and calling Pardiso afterwards with this parameter releases the memory, so then it works as expected. But shouldn't mkl_free_buffers() work, too?</description>
      <pubDate>Thu, 11 Aug 2011 21:32:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-leak/m-p/772166#M723</guid>
      <dc:creator>matse</dc:creator>
      <dc:date>2011-08-11T21:32:18Z</dc:date>
    </item>
    <item>
      <title>Pardiso - memory leak?</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-leak/m-p/772167#M724</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;MKL function &lt;STRONG&gt;mkl_free_buffers()&lt;/STRONG&gt; releases all memory which is taken by MKL memory manager software and already maked as free but can be used in the future. As to PARDISO-memory, it needs explicitly free such memory.</description>
      <pubDate>Mon, 15 Aug 2011 05:07:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Pardiso-memory-leak/m-p/772167#M724</guid>
      <dc:creator>barragan_villanueva_</dc:creator>
      <dc:date>2011-08-15T05:07:51Z</dc:date>
    </item>
  </channel>
</rss>

