<?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 Dear Tang Laoya, in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093628#M23396</link>
    <description>&lt;P&gt;Dear Tang Laoya,&lt;/P&gt;

&lt;P&gt;A call to mkl_free_buffers frees the memory allocated before this call by all threads spawned by MKL.&lt;/P&gt;

&lt;P&gt;A call to mkl_thread_free_buffers frees the memory allocated before this call by the calling thread.&lt;/P&gt;

&lt;P&gt;To find the description of these functions, you may have a look at reference manual -&amp;gt; support functions -&amp;gt; memory management here &lt;A href="https://software.intel.com/en-us/mkl-reference-manual-for-c"&gt;https://software.intel.com/en-us/mkl-reference-manual-for-c&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
    <pubDate>Wed, 20 Jan 2016 05:17:42 GMT</pubDate>
    <dc:creator>Evgueni_P_Intel</dc:creator>
    <dc:date>2016-01-20T05:17:42Z</dc:date>
    <item>
      <title>memory leakage problem</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093624#M23392</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;I have a project with multiple times using MKL functions. After tens of times calling my program, the memory usage is larger and large (from initial 100 MB to latter more than 10 GB). So I use the Intel Inspector to check the location of memory leak. However, the Inspector can't find the location from my code but it is in MKL's functions. The original post is here:&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/forums/intel-inspector-xe/topic/606912#comment-1856671" target="_blank"&gt;https://software.intel.com/en-us/forums/intel-inspector-xe/topic/606912#comment-1856671&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;could anyone help me to take a look at it?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Tang Laoya&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 03:02:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093624#M23392</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2016-01-19T03:02:47Z</dc:date>
    </item>
    <item>
      <title>Hi Tang Laoya,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093625#M23393</link>
      <description>&lt;P&gt;Hi Tang Laoya,&lt;/P&gt;

&lt;P&gt;Could you please call mkl_free_buffers in each thread just before it joins the master thread?&lt;/P&gt;

&lt;P&gt;You may also read the MKL documentation about memory management &lt;A href="https://software.intel.com/en-us/node/528564" target="_blank"&gt;https://software.intel.com/en-us/node/528564&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 05:54:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093625#M23393</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2016-01-19T05:54:00Z</dc:date>
    </item>
    <item>
      <title>Dear Evgueni,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093626#M23394</link>
      <description>&lt;P&gt;Dear&amp;nbsp;Evgueni,&lt;/P&gt;

&lt;P&gt;Thank you very much for your kindly reply. I added the line&amp;nbsp;&lt;/P&gt;

&lt;P&gt;call &amp;nbsp;mkl_thread_free_buffers()&lt;/P&gt;

&lt;P&gt;at the end of the cycle and before next cycle begin, and then checked the problem again, however, the problems are still here. Where should I place the function '&lt;SPAN style="font-size: 13.008px; line-height: 19.512px;"&gt;mkl_thread_free_buffers&lt;/SPAN&gt;' and what's mean '&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;&amp;nbsp;just before it joins the master thread&lt;/SPAN&gt;'?&lt;/P&gt;

&lt;P&gt;Thanks,&lt;/P&gt;

&lt;P&gt;Tang Laoya&lt;/P&gt;</description>
      <pubDate>Tue, 19 Jan 2016 20:33:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093626#M23394</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2016-01-19T20:33:57Z</dc:date>
    </item>
    <item>
      <title>Dear Evgueni,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093627#M23395</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Dear&amp;nbsp;Evgueni,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;The problem is solved. I should use the function&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;mkl_free_buffers&lt;/P&gt;

&lt;P&gt;you suggested instead of&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;mkl_thread_free_buffers&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;What is the difference between these two functions? The first one is a general one that include the memory by all threads?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px; line-height: 18px;"&gt;Tang Laoya&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2016 00:48:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093627#M23395</guid>
      <dc:creator>Zhanghong_T_</dc:creator>
      <dc:date>2016-01-20T00:48:16Z</dc:date>
    </item>
    <item>
      <title>Dear Tang Laoya,</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093628#M23396</link>
      <description>&lt;P&gt;Dear Tang Laoya,&lt;/P&gt;

&lt;P&gt;A call to mkl_free_buffers frees the memory allocated before this call by all threads spawned by MKL.&lt;/P&gt;

&lt;P&gt;A call to mkl_thread_free_buffers frees the memory allocated before this call by the calling thread.&lt;/P&gt;

&lt;P&gt;To find the description of these functions, you may have a look at reference manual -&amp;gt; support functions -&amp;gt; memory management here &lt;A href="https://software.intel.com/en-us/mkl-reference-manual-for-c"&gt;https://software.intel.com/en-us/mkl-reference-manual-for-c&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Evgueni.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Jan 2016 05:17:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/memory-leakage-problem/m-p/1093628#M23396</guid>
      <dc:creator>Evgueni_P_Intel</dc:creator>
      <dc:date>2016-01-20T05:17:42Z</dc:date>
    </item>
  </channel>
</rss>

