<?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 Thank you for you reply. I in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133321#M134948</link>
    <description>&lt;P&gt;Thank you for you reply. I know my report is possibly compiler/OS/hardware specific. I'm not sure what else I can do to help you reproduce the bug.&lt;/P&gt;

&lt;P&gt;I have firmly established that the appended code behaves differently depending on whether the FINAL procedures are included, at least on my computer with ifort 17. Without the FINAL procedures, the code eventually clogs up all available memory and crashes. With the FINAL procedure, it appears it can run indefinitely.&lt;/P&gt;

&lt;P&gt;How do I procede?&lt;/P&gt;</description>
    <pubDate>Fri, 29 Sep 2017 15:13:00 GMT</pubDate>
    <dc:creator>Aldo_H_</dc:creator>
    <dc:date>2017-09-29T15:13:00Z</dc:date>
    <item>
      <title>possible compiler bug: memory leakage with allocatable components</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133317#M134944</link>
      <description>&lt;P&gt;Dear developers,&lt;/P&gt;

&lt;P&gt;We've been having difficulty with a memory leaks, and we suspect the problem is in the compiler. The appended code (test_leak.f90) is similar to ours, and reproduces the problem.&lt;/P&gt;

&lt;P&gt;After executing the following commands, we see the memory usage of a.out increase approximately linearly in time.&lt;/P&gt;

&lt;PRE class="brush:bash;"&gt;ifort test_leak.f90
a.out &amp;amp;
top&lt;/PRE&gt;

&lt;P&gt;We don't see what what's wrong with the code.&lt;/P&gt;

&lt;P&gt;We noted that the program barely uses any memory when the FINAL procedures are uncommented. But shouldn't they be redundant? In "Modern Fortran Explained", Metcalf et al. say that "when a variable of derived type is deallocated, any ultimate allocatable component that&lt;BR /&gt;
	is currently allocated is also deallocated, as if by a deallocate statement".&lt;/P&gt;

&lt;P&gt;Extra info:&lt;/P&gt;

&lt;UL&gt;
	&lt;LI&gt;OS: CentOS Linux release 7.3.1611 (Core)&lt;/LI&gt;
	&lt;LI&gt;ifort version: 17.0.4&lt;/LI&gt;
	&lt;LI&gt;
		&lt;P&gt;The command lscpu prints the following CPU info:&lt;BR /&gt;
			Architecture:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x86_64&lt;BR /&gt;
			CPU op-mode(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32-bit, 64-bit&lt;BR /&gt;
			Byte Order:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Little Endian&lt;BR /&gt;
			CPU(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;BR /&gt;
			On-line CPU(s) list:&amp;nbsp;&amp;nbsp; 0-11&lt;BR /&gt;
			Thread(s) per core:&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;BR /&gt;
			Core(s) per socket:&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;BR /&gt;
			Socket(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;BR /&gt;
			NUMA node(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;BR /&gt;
			Vendor ID:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; GenuineIntel&lt;BR /&gt;
			CPU family:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6&lt;BR /&gt;
			Model:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 62&lt;BR /&gt;
			Model name:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Intel(R) Xeon(R) CPU E5-2630 v2 @ 2.60GHz&lt;BR /&gt;
			Stepping:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4&lt;BR /&gt;
			CPU MHz:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2899.914&lt;BR /&gt;
			BogoMIPS:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5205.87&lt;BR /&gt;
			Virtualization:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; VT-x&lt;BR /&gt;
			L1d cache:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32K&lt;BR /&gt;
			L1i cache:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 32K&lt;BR /&gt;
			L2 cache:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 256K&lt;BR /&gt;
			L3 cache:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 15360K&lt;BR /&gt;
			NUMA node0 CPU(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0-5&lt;BR /&gt;
			NUMA node1 CPU(s):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 6-11&lt;/P&gt;
	&lt;/LI&gt;
&lt;/UL&gt;

&lt;PRE class="brush:bash;"&gt;
&amp;nbsp;&lt;/PRE&gt;</description>
      <pubDate>Thu, 28 Sep 2017 14:57:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133317#M134944</guid>
      <dc:creator>Aldo_H_</dc:creator>
      <dc:date>2017-09-28T14:57:48Z</dc:date>
    </item>
    <item>
      <title>@Aldo H.,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133318#M134945</link>
      <description>&lt;P&gt;@Aldo H.,&lt;/P&gt;

&lt;P&gt;Your program main has an infinite loop!&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    do
        allocate(temp,source=f1 + f2)
        call temp%eval(3.0,value)
        deallocate(temp)
    enddo
&lt;/PRE&gt;

&lt;P&gt;Using Intel Fortran compiler 18.0, I don't notice any memory leak issue with a revised test case that executes the DO loop N number of times with N set to 10 once and 100 a second time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2017 21:12:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133318#M134945</guid>
      <dc:creator>FortranFan</dc:creator>
      <dc:date>2017-09-28T21:12:05Z</dc:date>
    </item>
    <item>
      <title>I think the program leaks a</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133319#M134946</link>
      <description>&lt;P&gt;I think the program leaks a tiny bit of memory every time it executes `&lt;CODE class="keyword"&gt;deallocate&lt;/CODE&gt;&lt;CODE class="plain"&gt;(temp)&lt;/CODE&gt;` and fails to free allocatable components. It's only a few real numbers, and so you'll need many loops for the problem to become noticeable.&lt;/P&gt;

&lt;P&gt;With the following loop, the program takes about a minute on my computer. Memory usage should stay constant in time, but it doesn't.&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;    do i = 1, huge(i)/100
        allocate(temp,source=f1 + f2)
        call temp%eval(3.0,value)
        deallocate(temp)
    enddo
&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 08:13:42 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133319#M134946</guid>
      <dc:creator>Aldo_H_</dc:creator>
      <dc:date>2017-09-29T08:13:42Z</dc:date>
    </item>
    <item>
      <title>If allocatable components are</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133320#M134947</link>
      <description>&lt;P&gt;If allocatable components are not deallocated when a variable of that type is deallocated, that's a compiler bug and a test case should be submitted to Intel. You can't necessarily depend on the OS report of memory growth to identify leaks. I've run a few tests with compiler version 18 and don't see any leaks.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 14:29:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133320#M134947</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2017-09-29T14:29:57Z</dc:date>
    </item>
    <item>
      <title>Thank you for you reply. I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133321#M134948</link>
      <description>&lt;P&gt;Thank you for you reply. I know my report is possibly compiler/OS/hardware specific. I'm not sure what else I can do to help you reproduce the bug.&lt;/P&gt;

&lt;P&gt;I have firmly established that the appended code behaves differently depending on whether the FINAL procedures are included, at least on my computer with ifort 17. Without the FINAL procedures, the code eventually clogs up all available memory and crashes. With the FINAL procedure, it appears it can run indefinitely.&lt;/P&gt;

&lt;P&gt;How do I procede?&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 15:13:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133321#M134948</guid>
      <dc:creator>Aldo_H_</dc:creator>
      <dc:date>2017-09-29T15:13:00Z</dc:date>
    </item>
    <item>
      <title>If you can reproduce the</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133322#M134949</link>
      <description>&lt;P&gt;If you can reproduce the problem with the version 18 compiler, submit a problem report to Intel through the &lt;A href="https://software.intel.com/en-us/support/online-service-center"&gt;Online Service Center&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2017 16:57:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133322#M134949</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2017-09-29T16:57:18Z</dc:date>
    </item>
    <item>
      <title>I tried with the ifort</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133323#M134950</link>
      <description>&lt;P&gt;I tried with the ifort version 18.0.1 and my code now works without problems. It seems that this bug was indeed fixed in the newest compiler.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Dec 2017 11:11:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/possible-compiler-bug-memory-leakage-with-allocatable-components/m-p/1133323#M134950</guid>
      <dc:creator>Aldo_H_</dc:creator>
      <dc:date>2017-12-12T11:11:57Z</dc:date>
    </item>
  </channel>
</rss>

