<?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 Re:MKL with Armadillo Memory leaks in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1267588#M31077</link>
    <description>&lt;P&gt;Hi Raimund,&lt;/P&gt;&lt;P&gt;We will work with the engineering team and will address this issue.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Khang&lt;/P&gt;&lt;BR /&gt;</description>
    <pubDate>Thu, 25 Mar 2021 00:17:36 GMT</pubDate>
    <dc:creator>Khang_N_Intel</dc:creator>
    <dc:date>2021-03-25T00:17:36Z</dc:date>
    <item>
      <title>MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1261023#M30995</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;for solving large systems of equations I use the Intel MKL library from the Intel oneAPI Base Toolkit, latest version, together with Armadillo, version 9.850 (latest version).&lt;/P&gt;
&lt;P&gt;For testing, I wrote a small program in Visual Studio 2019:&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;#include "..\..\armadillo\include\armadillo"&lt;BR /&gt;#include &amp;lt;iostream&amp;gt;&lt;BR /&gt;#include &amp;lt;fstream&amp;gt;&lt;BR /&gt;#include &amp;lt;cmath&amp;gt;&lt;BR /&gt;using namespace std;&lt;BR /&gt;using namespace arma; // ... Namespace for Aramdillo C++ Library&lt;BR /&gt;void main (void)&lt;BR /&gt;{&lt;BR /&gt;_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);&lt;BR /&gt;long n = 10;&lt;BR /&gt;mat A(n, n, fill::randu);&lt;BR /&gt;vec b(n, fill::randu);&lt;BR /&gt;vec x1 = solve(A, b);&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;When the equation system size is small (e.g. n=10) everything works fine, when the system size is large (e.g. n=100) I always get memory leaks:&lt;/P&gt;
&lt;P&gt;-------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;Dumping objects -&amp;gt;&lt;BR /&gt;{113} normal block at 0x0434B040, 4737552 bytes long.&lt;BR /&gt;Data: &amp;lt;@ 4 JH &amp;gt; 40 B0 34 04 00 00 00 10 4A 48 00 00 10 00 00 &lt;BR /&gt;{112} normal block at 0x0424A4B0, 132 bytes long.&lt;BR /&gt;Data: &amp;lt; $ &amp;gt; B0 A4 24 04 00 00 00 84 00 00 00 10 00 00 &lt;BR /&gt;{111} normal block at 0x04275CD8, 69648 bytes long.&lt;BR /&gt;Data: &amp;lt; $' &amp;gt; D8 5C 27 04 00 00 00 10 10 01 00 00 10 00 00&lt;/P&gt;
&lt;P&gt;------------------------------------------------------------------------------------------------------------&lt;/P&gt;
&lt;P&gt;The size of the memory leaks is independent of the equation system size. I use the following Intel "ia32" libraries: mkl_intel_c.lib mkl_sequential.lib mkl_core.lib. I get the memory leaks with both the MS-Visual C++ and the Intel C++ compiler.&lt;/P&gt;
&lt;P&gt;Armadillo support said that the error must be in the Intel MKL.&lt;/P&gt;
&lt;P&gt;Can anyone help me with this?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Raimund&lt;/P&gt;</description>
      <pubDate>Wed, 03 Mar 2021 13:44:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1261023#M30995</guid>
      <dc:creator>Gottkehaskamp</dc:creator>
      <dc:date>2021-03-03T13:44:54Z</dc:date>
    </item>
    <item>
      <title>Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1262326#M30996</link>
      <description>&lt;P&gt;Hi Raimund,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for reaching out to us.&lt;/P&gt;&lt;P&gt;As this issue is more related to Intel MKL, we are moving this thread to Intel MKL Forum.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The Intel Math Kernel Library&amp;nbsp;allocates and deallocates internal buffers to facilitate better performance, so that could be the reason for the memory leaks.&lt;/P&gt;&lt;P&gt;Try setting the &lt;B&gt;MKL_DISABLE_FAST_MM&lt;/B&gt; environment variable to &lt;B&gt;1&lt;/B&gt; or call the &lt;B&gt;mkl_disable_fast_mm()&lt;/B&gt; function and let us know if you are getting the same memory leaks.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Warm Regards,&lt;/P&gt;&lt;P&gt;Abhishek&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Mar 2021 12:04:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1262326#M30996</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-03-08T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1262381#M30997</link>
      <description>&lt;P&gt;the first memory leak disappears, but the next two are still present:&lt;/P&gt;
&lt;P&gt;{113} normal block at 0x03C38530, 132 bytes long.&lt;BR /&gt;Data: &amp;lt;0 &amp;gt; 30 85 C3 03 00 00 00 84 00 00 00 10 00 00 &lt;BR /&gt;{112} normal block at 0x03C39958, 69648 bytes long.&lt;BR /&gt;Data: &amp;lt;X &amp;gt; 58 99 C3 03 00 00 00 10 01 00 00 10 00 00 &lt;/P&gt;</description>
      <pubDate>Mon, 08 Mar 2021 16:16:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1262381#M30997</guid>
      <dc:creator>Gottkehaskamp</dc:creator>
      <dc:date>2021-03-08T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1263020#M31001</link>
      <description>&lt;P&gt;It may be that this information helps:&lt;/P&gt;
&lt;P&gt;the memory leaks only occur when linking statically&lt;BR /&gt;When linking using shared dll there are no memory leaks&lt;/P&gt;</description>
      <pubDate>Wed, 10 Mar 2021 09:48:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1263020#M31001</guid>
      <dc:creator>Gottkehaskamp</dc:creator>
      <dc:date>2021-03-10T09:48:14Z</dc:date>
    </item>
    <item>
      <title>Re: MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1264333#M31010</link>
      <description>&lt;P&gt;Hi Raimund,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the details. We are also getting the same issue with static linking(ia32), whereas linking dynamically(ia32) gives no leaks. The issue is very much reproducible. We are looking into this behavior and will get back to you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Warm Regards,&lt;/P&gt;
&lt;P&gt;Abhishek&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Mar 2021 08:01:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1264333#M31010</guid>
      <dc:creator>AbhishekD_Intel</dc:creator>
      <dc:date>2021-03-15T08:01:08Z</dc:date>
    </item>
    <item>
      <title>Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1267588#M31077</link>
      <description>&lt;P&gt;Hi Raimund,&lt;/P&gt;&lt;P&gt;We will work with the engineering team and will address this issue.&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Khang&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 Mar 2021 00:17:36 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1267588#M31077</guid>
      <dc:creator>Khang_N_Intel</dc:creator>
      <dc:date>2021-03-25T00:17:36Z</dc:date>
    </item>
    <item>
      <title>Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1348943#M32529</link>
      <description>&lt;P&gt;Hi Raimund,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your patience.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The memory leaks are occurring because of the absence of the mkl_free_buffers() function after calling MKL functions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please report this issue to Armadillo support and ask them to add mkl_free_buffers() after they call MKL functions.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 06 Jan 2022 07:13:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1348943#M32529</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-01-06T07:13:53Z</dc:date>
    </item>
    <item>
      <title>Re:MKL with Armadillo Memory leaks</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1351886#M32581</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;As we haven't heard back from you we are closing this thread. Please post a new question if you need any additional assistance from Intel as this thread will no longer be monitored.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vidya.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 17 Jan 2022 09:06:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/MKL-with-Armadillo-Memory-leaks/m-p/1351886#M32581</guid>
      <dc:creator>VidyalathaB_Intel</dc:creator>
      <dc:date>2022-01-17T09:06:41Z</dc:date>
    </item>
  </channel>
</rss>

