<?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 Optimiser bug in 12.1.0.233 in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759148#M14635</link>
    <description>Tim,&lt;BR /&gt;&lt;BR /&gt;You failed to notice that the largest array in my painstakingly cut-down demonstration program contains just 24 elements &lt;BR /&gt;and if that causes a stack overflow then you may tie feathers to me and call me a chicken.&lt;BR /&gt;&lt;BR /&gt;Rest assured that I followed all of the recommendations in your beginner's guide to diagnosing segmentation faults,&lt;BR /&gt;as well as others arising from my many years experience distinguishing programming and O/S errors from compiler bugs.&lt;BR /&gt;I hope that with a small and completely self-contained example with explicit and clear instructions, someone will take the few seconds to check that it is reproducible.&lt;BR /&gt;&lt;BR /&gt;One other thing I failed to mention is that this bug in the Intel compiler (I'm very sure of that) actually showed up and causes a crash in a widely-used electronic structure code. This is a significant issue, as I will need to advise our users to avoid this version of the compiler.&lt;BR /&gt;&lt;BR /&gt;Keith Refson&lt;BR /&gt;</description>
    <pubDate>Mon, 31 Oct 2011 08:13:07 GMT</pubDate>
    <dc:creator>Keith_R_</dc:creator>
    <dc:date>2011-10-31T08:13:07Z</dc:date>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759146#M14633</link>
      <description>Version 12.1.0.233 of the compiler miscompiles the attached file (an extract of a much larger program).&lt;BR /&gt;This ran find on earlier versions of the compiler, and on other compilers.&lt;BR /&gt;&lt;BR /&gt;When compiled at -O3 with debug symbols and traceback the program crashes at tuntime with a segfault.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]$ ifort     -O3 -g -traceback -fno-inline-functions  force_segv.f90
$ ./a.out
forrtl: severe (174): SIGSEGV, segmentation fault occurred
Image              PC                Routine            Line        Source
a.out              0000000000403035  force_test_mp_fir          32  force_segv.f90
a.out              0000000000402DAE  MAIN__                     60  force_segv.f90
a.out              0000000000402A9C  Unknown               Unknown  Unknown
libc.so.6          00007F77C9C9814D  Unknown               Unknown  Unknown
a.out              00000000004029A9  Unknown               Unknown  Unknown
[/bash]&lt;/PRE&gt; &lt;BR /&gt;The program runs to completion when compiled with versions 11.1 or 12.0, or at a lower optimisation level. In fact&lt;BR /&gt;removing the "-g -traceback" flags cause it to apparently succeed, but the error is still there according to valgrind - it just fails to cause a segmentation fault.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[bash]==8194== Invalid read of size 8
==8194==    at 0x402FD6: force_test_mp_firstd_calculate_forces_ (in /home/kr/CASTEP/Compiler_Bugs/Ifort12.1_firstd/a.out)
==8194==    by 0x402D7F: MAIN__ (in /home/kr/CASTEP/Compiler_Bugs/Ifort12.1_firstd/a.out)
==8194==    by 0x402A9B: main (in /home/kr/CASTEP/Compiler_Bugs/Ifort12.1_firstd/a.out)
==8194==  Address 0x5a6a128 is not stack'd, malloc'd or (recently) free'd[/bash]&lt;/PRE&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;$ ifort -V&lt;BR /&gt;Intel Fortran Intel 64 Compiler XE for applications running on Intel 64, Version 12.1.0.233 Build 20110811&lt;BR /&gt;Copyright (C) 1985-2011 Intel Corporation. All rights reserved.&lt;BR /&gt;$ uname -a&lt;BR /&gt;Linux kohn 2.6.38.7-desktop-1mnb2 #1 SMP Sun May 22 19:38:58 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux&lt;BR /&gt;$ cat /etc/redhat-release&lt;BR /&gt;Red Hat Enterprise Linux AS release 4 (Nahant Update 9)&lt;BR /&gt;&lt;BR /&gt;I eventually gave up after many attempts to log into Premier support, so I hope this can be treated as reporting the bug here!</description>
      <pubDate>Sun, 30 Oct 2011 17:55:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759146#M14633</guid>
      <dc:creator>Keith_R_</dc:creator>
      <dc:date>2011-10-30T17:55:27Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759147#M14634</link>
      <description>You failed to mention whether you followed any of the recommendations in the advice posted at the top of this forum about investigating such problems.&lt;BR /&gt;If that advice doesn't include considering the implications of running on a no longer supported OS, you might mentally add that to the list, which normally begins with raising stack limit or considering -heap-arrays.</description>
      <pubDate>Mon, 31 Oct 2011 00:49:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759147#M14634</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-10-31T00:49:16Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759148#M14635</link>
      <description>Tim,&lt;BR /&gt;&lt;BR /&gt;You failed to notice that the largest array in my painstakingly cut-down demonstration program contains just 24 elements &lt;BR /&gt;and if that causes a stack overflow then you may tie feathers to me and call me a chicken.&lt;BR /&gt;&lt;BR /&gt;Rest assured that I followed all of the recommendations in your beginner's guide to diagnosing segmentation faults,&lt;BR /&gt;as well as others arising from my many years experience distinguishing programming and O/S errors from compiler bugs.&lt;BR /&gt;I hope that with a small and completely self-contained example with explicit and clear instructions, someone will take the few seconds to check that it is reproducible.&lt;BR /&gt;&lt;BR /&gt;One other thing I failed to mention is that this bug in the Intel compiler (I'm very sure of that) actually showed up and causes a crash in a widely-used electronic structure code. This is a significant issue, as I will need to advise our users to avoid this version of the compiler.&lt;BR /&gt;&lt;BR /&gt;Keith Refson&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2011 08:13:07 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759148#M14635</guid>
      <dc:creator>Keith_R_</dc:creator>
      <dc:date>2011-10-31T08:13:07Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759149#M14636</link>
      <description>I can reproduce the bug on OpenSuse 11.4-X64 and IFort 12.1.0.233 Build 20110811. A workaround, at least for the short example, is to leave out the &lt;B&gt;-fno-inline-functions &lt;/B&gt;option. Please see if you can use this workaround.&lt;BR /&gt;&lt;BR /&gt;Alternatively, you could try the more recent updated compiler, released this month.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2011 14:11:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759149#M14636</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-10-31T14:11:04Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759150#M14637</link>
      <description>OK, I thought you were complaining about it not running on the old OS.&lt;BR /&gt;&lt;BR /&gt;The run-time failure shows up even on a recent OS with current ifort, unless&lt;BR /&gt;!dir$ optimize:2 &lt;BR /&gt;is set in the subroutine, or&lt;BR /&gt;!dir$ no vector&lt;BR /&gt;or &lt;BR /&gt;!dir$ nounroll_and_jam&lt;BR /&gt;is set on the inner failing do loop.&lt;BR /&gt;&lt;BR /&gt;Strangely, the broken optimization is suppressed by turning on compiler phase diagnostics, or by writing the loop swap into the source code rather than letting the compiler attempt it.&lt;BR /&gt;I agree, there have been too many failures lately associated with -O3. The latest release fixed some but not this one.</description>
      <pubDate>Mon, 31 Oct 2011 14:17:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759150#M14637</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-10-31T14:17:47Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759151#M14638</link>
      <description>I did not mean to suggest this was an O/S version issue - in fact it occurs on a variery of systems, both&lt;BR /&gt;supported and unsupported. Sorry if I gave that impression.&lt;BR /&gt;&lt;BR /&gt;The failure is, as you say a fragile one and it took me half a day to boil down the real code. &lt;B&gt;-fno-inline-functions&lt;BR /&gt;&lt;/B&gt;Is a workaround for the demo example bug not for&lt;B&gt; &lt;/B&gt;the real-world code. (I might guess because it can optimise everything away once the function is inlined into the main program as the code produces no output).&lt;BR /&gt;&lt;BR /&gt;I have an idea why the behaviour is so fragile or removing -traceback. According to valgrind the cause of the segfault is a READ instruction from an address outside the heap and the stack. Possibly it is picking up a junk address and attempting to read from that. If the value points to real data, in that case there will be no segmentation fault, although the bad code is still doing domething wrong...&lt;BR /&gt;&lt;BR /&gt;The good news is that I have now been able to get back in to my premier support account. Can I report it there even though I am not the licensee and my account is not registered for this version?&lt;BR /&gt;&lt;BR /&gt;Keith Refson&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2011 15:53:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759151#M14638</guid>
      <dc:creator>Keith_R_</dc:creator>
      <dc:date>2011-10-31T15:53:53Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759152#M14639</link>
      <description>In your shoes, I would place very little trust in &lt;B&gt;valgrind&lt;/B&gt; in combination with &lt;B&gt;IFort&lt;/B&gt; compiled code. I have seen &lt;B&gt;valgrind&lt;/B&gt; report memory read errors with every &lt;B&gt;IFort&lt;/B&gt; compiled program that does I/O, such as this trivial program:&lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;[fortran]      write(*,*)exp(1.0)
      end
[/fortran]&lt;/PRE&gt; &lt;PRE&gt;[bash]Use of uninitialised value of size 8
==28708==    at 0x429939: for__add_to_lf_table
&lt;BR /&gt;[/bash]&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Oct 2011 16:03:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759152#M14639</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2011-10-31T16:03:03Z</dc:date>
    </item>
    <item>
      <title>Optimiser bug in 12.1.0.233</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759153#M14640</link>
      <description>A premier support account isn't registered for a specific version. If the license associated with your account hasn't expired, it will be fine. Note that I verified the problem still appears in 12.1.1 Intel64. Include the URL of this thread in your submission.</description>
      <pubDate>Mon, 31 Oct 2011 18:02:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Optimiser-bug-in-12-1-0-233/m-p/759153#M14640</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2011-10-31T18:02:03Z</dc:date>
    </item>
  </channel>
</rss>

