<?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: Adding debugging 'print' statements changes variable values in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740198#M186</link>
    <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I'd turn on all error checks:&lt;BR /&gt;&lt;BR /&gt;-check all -g -traceback -fp-stack-check -fpe0&lt;BR /&gt;&lt;BR /&gt;use these on your compile and link (assuming you use ifort for the link step)&lt;BR /&gt;&lt;BR /&gt;What optimization options have you tried? O0, O2, O3?&lt;BR /&gt;</description>
    <pubDate>Thu, 22 Oct 2009 19:36:21 GMT</pubDate>
    <dc:creator>Ron_Green</dc:creator>
    <dc:date>2009-10-22T19:36:21Z</dc:date>
    <item>
      <title>Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740196#M184</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'm having a frustrating time debugging a problem with a fortran 77 code that I'm working on. I observe a certain array 'grad' is filled with large values of order 1.0E+154. When I add debugging statements to print the values of varibles used in the the calculation of 'grad', the problem disappears!, i.e. the array 'grad' contains the values I expect to see. I could just leave the debugging print statements in the code and move on, but this behaviour is unsettling and makes me think there is a more serious problem lurking just beneath the surface.&lt;BR /&gt;&lt;BR /&gt;Here are some details:&lt;BR /&gt;&lt;BR /&gt;- It is a parallel code written in fortran 77 and uses MPI for the parallel stuff&lt;BR /&gt;- code is compiled using mpif90 to be run on intel itanium 2 processors&lt;BR /&gt;- Linux Redhat Fedora OS&lt;BR /&gt;&lt;BR /&gt;Any help with this problem would be greatly appreciated&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Howard&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Oct 2009 15:37:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740196#M184</guid>
      <dc:creator>howard75</dc:creator>
      <dc:date>2009-10-21T15:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740197#M185</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;Are you bypassing initialization of your data? (i.e. incorrectly assuming variables default to initialization to 0.0)&lt;BR /&gt;&lt;BR /&gt;print statements indirectly insert a critical section into the code. This may affect code that has data race conditions.&lt;BR /&gt;&lt;BR /&gt;Also, inserting print statements will change optimizations (i.e. varible may need to be saved from register to memory across call to print).&lt;BR /&gt;&lt;BR /&gt;You might experiment by enclosing the questionable section of code in a critical section, then move the begin/end of critical section closer together. When you transition from good results to bad results this may disclose the source of the problem.&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey</description>
      <pubDate>Wed, 21 Oct 2009 16:28:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740197#M185</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-21T16:28:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740198#M186</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
I'd turn on all error checks:&lt;BR /&gt;&lt;BR /&gt;-check all -g -traceback -fp-stack-check -fpe0&lt;BR /&gt;&lt;BR /&gt;use these on your compile and link (assuming you use ifort for the link step)&lt;BR /&gt;&lt;BR /&gt;What optimization options have you tried? O0, O2, O3?&lt;BR /&gt;</description>
      <pubDate>Thu, 22 Oct 2009 19:36:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740198#M186</guid>
      <dc:creator>Ron_Green</dc:creator>
      <dc:date>2009-10-22T19:36:21Z</dc:date>
    </item>
    <item>
      <title>Re: Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740199#M187</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; &lt;BR /&gt;Are you bypassing initialization of your data? (i.e. incorrectly assuming variables default to initialization to 0.0)&lt;BR /&gt;&lt;BR /&gt;Jim Dempsey&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
hi Jim,&lt;BR /&gt;Is not true that ifort initializes all uninitialized variable to zero? I guess i read it somwhere! If not, is there any other way of initializing them(those are not initialized) in one go to zero and keep the values for those who are initialized?&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 08:56:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740199#M187</guid>
      <dc:creator>roddur</dc:creator>
      <dc:date>2009-10-23T08:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740200#M188</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;/DIV&gt;
&lt;BR /&gt;/Qzero[-]&lt;BR /&gt;enable/disable(DEFAULT) implicit initialization to zero of local&lt;BR /&gt;scalar variables of intrinsic type INTEGER, REAL, COMPLEX, or&lt;BR /&gt;LOGICAL that are saved and not initialized&lt;BR /&gt;&lt;BR /&gt;That is for local variables not global nor module&lt;BR /&gt;You may need to explicitly initialize global and module data.&lt;BR /&gt;What you see in Debug build is not necessarily what you will get in release mode.&lt;BR /&gt;&lt;BR /&gt;Steve could answer if the FORTRAN spec requires initialization global and module data to 0 (when not otherwise initialized).&lt;BR /&gt;&lt;BR /&gt;Program load time and file image size can be reduced by NOT having implicit initializaton to 0.&lt;BR /&gt;&lt;BR /&gt;Jim&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 15:14:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740200#M188</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2009-10-23T15:14:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding debugging 'print' statements changes variable values</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740201#M189</link>
      <description>&lt;DIV style="margin:0px;"&gt;
&lt;DIV id="quote_reply" style="width: 100%; margin-top: 5px;"&gt;
&lt;DIV style="margin-left:2px;margin-right:2px;"&gt;Quoting - &lt;A href="https://community.intel.com/en-us/profile/99850"&gt;jimdempseyatthecove&lt;/A&gt;&lt;/DIV&gt;
&lt;DIV style="background-color:#E5E5E5; padding:5px;border: 1px; border-style: inset;margin-left:2px;margin-right:2px;"&gt;&lt;EM&gt; Steve could answer if the FORTRAN spec requires initialization global and module data to 0 (when not otherwise initialized).&lt;BR /&gt;&lt;BR /&gt;&lt;/EM&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;No, it does not. If you don't explicitly initialize any variable, it has an undefined initial value. This includes module variables and COMMON.&lt;BR /&gt;</description>
      <pubDate>Fri, 23 Oct 2009 15:57:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Adding-debugging-print-statements-changes-variable-values/m-p/740201#M189</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2009-10-23T15:57:57Z</dc:date>
    </item>
  </channel>
</rss>

