<?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 in dtrmm shipped with MKL 8.0 Windows/IA32 in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961586#M15952</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I am giving the C++ code below to demonstrate this memory leakage. The C++ code can be complied in .Net 2003 and linked with MKL 8.0 (remember to include "mkl.h" to you "include path" and to add "libguide.lib" and "mkl_c.lib" to your library list).&lt;/P&gt;
&lt;P&gt;If you start the debug in the .Net DEV, you willsee the leakage information in the "Output" window in the DEV. For comparison, you can uncomment the "dtrmv" line and comment the "dtrmm" line; then, you will see no leakage.&lt;/P&gt;
&lt;P&gt;I am very concerned with this problem.&lt;/P&gt;
&lt;P&gt;======================================&lt;/P&gt;
&lt;P&gt;#include "mkl.h"&lt;/P&gt;
&lt;P&gt;using namespace std;&lt;/P&gt;
&lt;P&gt;#define CRTDBG_MAP_ALLOC&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;CRTDBG.H&gt;&lt;/CRTDBG.H&gt;&lt;/STDLIB.H&gt;&lt;/P&gt;
&lt;P&gt;/* Test the memory leakage of dtrmm in MKL */&lt;/P&gt;
&lt;P&gt;int _tmain(int argc, _TCHAR* argv[])&lt;BR /&gt;{&lt;BR /&gt;_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );&lt;/P&gt;
&lt;P&gt;double a[] = {1,2,3,1,0,1,2,1,0,0,1,4,0,0,0,1};&lt;BR /&gt;double b[] = {1,2,3,4};&lt;BR /&gt;// a=&lt;BR /&gt;// 1 0 0 0 &lt;BR /&gt;// 2 1 0 0&lt;BR /&gt;// 3 2 1 0&lt;BR /&gt;// 1 1 4 1&lt;BR /&gt;// A*b = [1 4 10 19]'&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;double alpha = 1.0;&lt;BR /&gt;int lda=4;&lt;BR /&gt;int m=4;&lt;BR /&gt;int rhs=1;&lt;BR /&gt;int inc = 1;&lt;/P&gt;
&lt;P&gt;dtrmm("L","L","N","U",&amp;amp;m,&amp;amp;rhs,α,a,&amp;amp;lda,b,&amp;amp;lda);&lt;BR /&gt;//dtrmv("L","N","U",&amp;amp;m,a,&amp;amp;m,b,&amp;amp;inc);&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Message Edited by wy2002@columbia.edu on &lt;SPAN class="date_text"&gt;11-22-2005&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:13 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 20 Nov 2005 13:20:06 GMT</pubDate>
    <dc:creator>wy2002</dc:creator>
    <dc:date>2005-11-20T13:20:06Z</dc:date>
    <item>
      <title>Memory leakage in dtrmm shipped with MKL 8.0 Windows/IA32</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961586#M15952</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;I am giving the C++ code below to demonstrate this memory leakage. The C++ code can be complied in .Net 2003 and linked with MKL 8.0 (remember to include "mkl.h" to you "include path" and to add "libguide.lib" and "mkl_c.lib" to your library list).&lt;/P&gt;
&lt;P&gt;If you start the debug in the .Net DEV, you willsee the leakage information in the "Output" window in the DEV. For comparison, you can uncomment the "dtrmv" line and comment the "dtrmm" line; then, you will see no leakage.&lt;/P&gt;
&lt;P&gt;I am very concerned with this problem.&lt;/P&gt;
&lt;P&gt;======================================&lt;/P&gt;
&lt;P&gt;#include "mkl.h"&lt;/P&gt;
&lt;P&gt;using namespace std;&lt;/P&gt;
&lt;P&gt;#define CRTDBG_MAP_ALLOC&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;CRTDBG.H&gt;&lt;/CRTDBG.H&gt;&lt;/STDLIB.H&gt;&lt;/P&gt;
&lt;P&gt;/* Test the memory leakage of dtrmm in MKL */&lt;/P&gt;
&lt;P&gt;int _tmain(int argc, _TCHAR* argv[])&lt;BR /&gt;{&lt;BR /&gt;_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );&lt;/P&gt;
&lt;P&gt;double a[] = {1,2,3,1,0,1,2,1,0,0,1,4,0,0,0,1};&lt;BR /&gt;double b[] = {1,2,3,4};&lt;BR /&gt;// a=&lt;BR /&gt;// 1 0 0 0 &lt;BR /&gt;// 2 1 0 0&lt;BR /&gt;// 3 2 1 0&lt;BR /&gt;// 1 1 4 1&lt;BR /&gt;// A*b = [1 4 10 19]'&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;double alpha = 1.0;&lt;BR /&gt;int lda=4;&lt;BR /&gt;int m=4;&lt;BR /&gt;int rhs=1;&lt;BR /&gt;int inc = 1;&lt;/P&gt;
&lt;P&gt;dtrmm("L","L","N","U",&amp;amp;m,&amp;amp;rhs,α,a,&amp;amp;lda,b,&amp;amp;lda);&lt;BR /&gt;//dtrmv("L","N","U",&amp;amp;m,a,&amp;amp;m,b,&amp;amp;inc);&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;Message Edited by wy2002@columbia.edu on &lt;SPAN class="date_text"&gt;11-22-2005&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:13 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 20 Nov 2005 13:20:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961586#M15952</guid>
      <dc:creator>wy2002</dc:creator>
      <dc:date>2005-11-20T13:20:06Z</dc:date>
    </item>
    <item>
      <title>Re: Memory leakage in dtrmm shipped with MKL 8.0 Windows/IA32</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961587#M15953</link>
      <description>&lt;DIV&gt;My college reported that he did not observe the leakage of dtrmm under Linux using "LeakTrace".&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I am wondering whethersome authorities from INTEL could confirm my observation and provide with a patch.&lt;/DIV&gt;</description>
      <pubDate>Wed, 23 Nov 2005 14:16:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961587#M15953</guid>
      <dc:creator>wy2002</dc:creator>
      <dc:date>2005-11-23T14:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Memory leakage in dtrmm shipped with MKL 8.0 Windows/IA32</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961588#M15954</link>
      <description>&lt;DIV&gt;MKL allocates buffers that it doesn't automatically give back at the end of the function call. This is an optimization because frequently functions such as DTRMM (which finally calls DGEMM) need buffers and will often be called many hundreds or thousands or even more times during the execution of a program.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I would not call this a leak as it is planned and intentional. However, were you to put calls to this function in a loop and the "leaks" kept growing, then we have a problem.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Also, you can turn the memory manager off by setting to any value &lt;FONT face="Courier New"&gt;MKL_DISABLE_FAST_MM.&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/DIV&gt;
&lt;DIV&gt;The memory manager is discussed in Technical User Notes (mkluse).&lt;/DIV&gt;</description>
      <pubDate>Thu, 01 Dec 2005 06:40:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Memory-leakage-in-dtrmm-shipped-with-MKL-8-0-Windows-IA32/m-p/961588#M15954</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2005-12-01T06:40:24Z</dc:date>
    </item>
  </channel>
</rss>

