<?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 Hi Jim, in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130804#M134256</link>
    <description>&lt;P&gt;Hi Jim,&lt;/P&gt;

&lt;P&gt;Thanks for the help. I'm using the&amp;nbsp;2016.1.150 ver. For the debug build, I use:&lt;/P&gt;

&lt;P&gt;-fpe0 -gen-interfaces -warn interfaces -traceback -g -debug all -implicitnone -warn unused -fp-stack-check -heap-arrays -ftrapuv -check pointers -O0 -save -w90 -w -w95&lt;/P&gt;

&lt;P&gt;Is this enough?&lt;/P&gt;

&lt;P&gt;I also just tried a new build on my cluster -&amp;nbsp;2017.0.098 ver. Strangely, using the same option (&lt;SPAN style="font-size: 12px;"&gt;only use -O1 in one of the source code, others still using -ip -O3 -ipo), the code still gives segmentation fault. Only the debug build works. However, I haven't tried switching off the optimized option one by one for each source code for the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;2017.0.098 ver.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 17 Jun 2017 03:06:15 GMT</pubDate>
    <dc:creator>Wee_Beng_T_</dc:creator>
    <dc:date>2017-06-17T03:06:15Z</dc:date>
    <item>
      <title>Error when Optimization used in code</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130802#M134254</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a code which uses the PETSc library. When optimization is turned off, the code runs fine. However, when I turn on optimization, I got:&lt;/P&gt;

&lt;P&gt;[0]PETSC ERROR: ------------------------------------------------------------------------&lt;BR /&gt;
	[0]PETSC ERROR: Caught signal number 11 SEGV: Segmentation Violation, probably memory access out of range&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;After some search, I found that if I only use -O1 in one of the source code (others still using -ip -O3 -ipo), the code runs fine.&lt;/P&gt;

&lt;P&gt;The error seems to happen after calling a PETSc subroutine. However, this subroutine was also called in other source codes but it runs fine with optimization.&lt;/P&gt;

&lt;P&gt;So is this a bug with the optimization routine? Or is there some error in the PETsc subroutine?&lt;/P&gt;

&lt;P&gt;Please advise. Thanks!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 16:32:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130802#M134254</guid>
      <dc:creator>Wee_Beng_T_</dc:creator>
      <dc:date>2017-06-16T16:32:47Z</dc:date>
    </item>
    <item>
      <title>It would help if you state</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130803#M134255</link>
      <description>&lt;P&gt;It would help if you state the version number of IVF with your problem.&lt;/P&gt;

&lt;P&gt;Have you built the program in Debug build including all tests (in particular undefined variables, and argument checking).&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Fri, 16 Jun 2017 17:35:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130803#M134255</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2017-06-16T17:35:23Z</dc:date>
    </item>
    <item>
      <title>Hi Jim,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130804#M134256</link>
      <description>&lt;P&gt;Hi Jim,&lt;/P&gt;

&lt;P&gt;Thanks for the help. I'm using the&amp;nbsp;2016.1.150 ver. For the debug build, I use:&lt;/P&gt;

&lt;P&gt;-fpe0 -gen-interfaces -warn interfaces -traceback -g -debug all -implicitnone -warn unused -fp-stack-check -heap-arrays -ftrapuv -check pointers -O0 -save -w90 -w -w95&lt;/P&gt;

&lt;P&gt;Is this enough?&lt;/P&gt;

&lt;P&gt;I also just tried a new build on my cluster -&amp;nbsp;2017.0.098 ver. Strangely, using the same option (&lt;SPAN style="font-size: 12px;"&gt;only use -O1 in one of the source code, others still using -ip -O3 -ipo), the code still gives segmentation fault. Only the debug build works. However, I haven't tried switching off the optimized option one by one for each source code for the&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;2017.0.098 ver.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2017 03:06:15 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130804#M134256</guid>
      <dc:creator>Wee_Beng_T_</dc:creator>
      <dc:date>2017-06-17T03:06:15Z</dc:date>
    </item>
    <item>
      <title>The options  you used should</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130805#M134257</link>
      <description>&lt;P&gt;The options&amp;nbsp; you used should have caught most program call/interface issues.&lt;/P&gt;

&lt;P&gt;Try -O3 without inter-file IPO (intra file is OK for first test)&lt;BR /&gt;
	Then -O3 without any IPO&lt;BR /&gt;
	Then disable -O3 on a file by file basis (if you have a lot of files you can perform a quazi-binary search).&lt;/P&gt;

&lt;P&gt;There were reports of some vectorization issues on some nested loops.&lt;/P&gt;

&lt;P&gt;Are you using a 3rd party library?&lt;BR /&gt;
	In this case, the interface could be undefined and the compiler would have no way to verify arguments. If you make a call with incorrect arguments then this may trigger the error.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sat, 17 Jun 2017 20:07:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130805#M134257</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2017-06-17T20:07:24Z</dc:date>
    </item>
    <item>
      <title>Thanks Jim,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130806#M134258</link>
      <description>&lt;P&gt;Thanks Jim,&lt;/P&gt;

&lt;P&gt;Based on ver&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;2016.1.150, I found that one file can only use -O1, without -ip and -ipo. For other files, I use -O3 -ip and -ipo.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;So is this the best solution, assuming there's no error with any argument.?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 05:55:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130806#M134258</guid>
      <dc:creator>Wee_Beng_T_</dc:creator>
      <dc:date>2017-06-21T05:55:37Z</dc:date>
    </item>
    <item>
      <title>Yes, I have a few programs</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130807#M134259</link>
      <description>&lt;P&gt;Yes, I have a few programs that I must disable IPO, and in some cases O2 or O3. One of the facts of life with living in an imperfect world.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jun 2017 12:34:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Error-when-Optimization-used-in-code/m-p/1130807#M134259</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2017-06-21T12:34:41Z</dc:date>
    </item>
  </channel>
</rss>

