<?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 Different results in release mode and debug mode  in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767694#M20980</link>
    <description>I agree with you that the compiler should be able to diagnose uninitialized variables better. It remains something we're interested in.&amp;nbsp; If you had Intel Fortran Studio and used the Static Analysis feature, it would probably have detected this.&lt;BR /&gt;&lt;BR /&gt;However, there are many coding errors the compiler cannot reliably detect.&amp;nbsp; It is not that the user must check the options, it's that the user should write correct code.&amp;nbsp; Uninitialized variables, or assuming SAVE semantics where the language does not specify it, is a coding error. That some other compiler hid the error from you doesn't make it any less of a coding error.</description>
    <pubDate>Tue, 14 Aug 2012 23:47:59 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2012-08-14T23:47:59Z</dc:date>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767688#M20974</link>
      <description>I have a set of FORTRAN codes and I got different results from release mode and debug mode. &lt;BR /&gt;&lt;BR /&gt;I am using the IVF version:&lt;BR /&gt;&amp;nbsp;&lt;P&gt;Intel® Visual Fortran Compiler Integration for Microsoft Visual Studio* 2008, 11.1.3471.2008, Copyright (C) 2002-2010 Intel Corporation&lt;BR /&gt;&lt;BR /&gt;I found that the reason is&lt;BR /&gt;&lt;BR /&gt;Local variables&amp;nbsp;forget&amp;nbsp;to be initialized in my code&lt;BR /&gt;&lt;BR /&gt;In release mode, these variables are forced to be 0 while in debug mode, these variable still keep the values in last call.&lt;BR /&gt;&lt;BR /&gt;I am using the default compiling options from IVF and shows below.&lt;BR /&gt;&lt;BR /&gt;Release mode: /nologo /module:"Release\\\\" /object:"Release\\\\" /libs:static /threads /c&lt;BR /&gt;&lt;BR /&gt;Debug mode: /nologo /debug:full /Od /gen-interfaces /warn:declarations /warn:interfaces /module:"Debug\\\\" /object:"Debug\\\\" /traceback /check:bounds /libs:static /threads /dbglibs /c&lt;BR /&gt;&lt;BR /&gt;I want to say this is abnormal for IVF. At least IVF should give me a warning message like "the variable is used before initialization" which is the usual check in language C or in old&amp;nbsp;Compaq Visual Fortran.&lt;BR /&gt;&lt;BR /&gt;I cannot even find this kind of warning&amp;nbsp;check in compiling options. I only find an option for "Initalize local&amp;nbsp;Saved Scalars to Zero" /Qzero. But&amp;nbsp;I found this by taking me about half day to print variables&amp;nbsp;and trace variables.&lt;BR /&gt;&lt;BR /&gt;I guess this issue will bring lots of inconvinience and is a trap when people want to re-pick up&amp;nbsp;their old&amp;nbsp;fortran code.&lt;BR /&gt;&lt;BR /&gt;So I strongly suggest IVF list this /Qzero to be an default compiling options for debug mode. Or IVF should add the warning check for variables used before initialization&lt;BR /&gt;&lt;BR /&gt;IF IVF IS REALLY CARE ABOUT CUSTOMERS!!!&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 17:56:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767688#M20974</guid>
      <dc:creator>turkeydodo</dc:creator>
      <dc:date>2012-08-14T17:56:38Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767689#M20975</link>
      <description>The defaults in Visual Studio project conversion set the CVF compatibility options to which you allude. Those can't be depended on, particularly if you start modernizing your code. &amp;nbsp; If you are interested in moving forward, it's important to correct any deficiencies which make your application non-compliant with Fortran standards.&amp;nbsp; /check option includes /check:uninit as a default, and there is a CVF compatible spelling option /CU.&amp;nbsp; There is also /Qtrapuv.&amp;nbsp; Other ways such as Inspector may be useful to catch unitialized variables which may still be a problem if you have added parallelization.</description>
      <pubDate>Tue, 14 Aug 2012 18:34:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767689#M20975</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2012-08-14T18:34:33Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767690#M20976</link>
      <description>&lt;P&gt;I want to&amp;nbsp;add it for this issue&lt;BR /&gt;&lt;BR /&gt;In debug mode, after I add two options /Qsave and /Qzero,&amp;nbsp;I got exact same results compare to those in release mode.&lt;BR /&gt;&lt;BR /&gt;I also find&amp;nbsp;similar post&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://redfort-software.intel.com/en-us/forums/showthread.php?t=100440" target="_blank"&gt;http://redfort-software.intel.com/en-us/forums/showthread.php?t=100440&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It is headache&amp;nbsp;for me (but also&amp;nbsp;for&amp;nbsp;most customers) to play so many&amp;nbsp;compiling options.&amp;nbsp;I don't know the focus of IVF. The focus is to make user more simple&amp;nbsp;and easy to&amp;nbsp;use it OR focus on complicated Fortran standards.&amp;nbsp;More and more customer will escape if IVF makes things more complicated. I strongly suggest to&amp;nbsp;tune the default compiling options to satisfy previous&amp;nbsp;CVF options. This is a backward compatiblity issue.&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Aug 2012 18:55:58 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767690#M20976</guid>
      <dc:creator>turkeydodo</dc:creator>
      <dc:date>2012-08-14T18:55:58Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767691#M20977</link>
      <description>I would very much disagree about /Qzero being the default.&amp;nbsp; We have had many customers thank us for revealing coding errors in their applications that CVF and other compilers did not.&amp;nbsp; However, the default for CVF converted projects is /Qsave, which will largely have the same effect.&amp;nbsp; CVF did not zero-initialize variables.&lt;BR /&gt;&lt;BR /&gt;We do have /check:uninit as a default, but it doesn't catch everything.</description>
      <pubDate>Tue, 14 Aug 2012 19:37:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767691#M20977</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-08-14T19:37:45Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767692#M20978</link>
      <description>As a suggestion (that will probably get shot down) perhaps you ight consider having a way to transfer all 'non debug' options from the debug tab to the release tab.&lt;BR /&gt;That might be a way to avoid many if not most of the 'different results' issues.&lt;BR /&gt;To compare options i find that by opening 2 separate sessions, one in debug and one in release, I then can modify the release options to be the same as debug (except of course the debug options).&lt;BR /&gt;And then close debug first! and then when you save the release option session they options are the same as debug.&lt;BR /&gt;&lt;BR /&gt;I frequently we see folks who raise the 'different results' issue between debug &amp;amp; release and i believe it is mainly due to 'different options' set because they mess around with the options in debug and then don't make the same changes to release.&lt;BR /&gt;&lt;BR /&gt;Ok, fire away! ;-)&lt;BR /&gt;</description>
      <pubDate>Tue, 14 Aug 2012 19:47:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767692#M20978</guid>
      <dc:creator>bmchenry</dc:creator>
      <dc:date>2012-08-14T19:47:37Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767693#M20979</link>
      <description>The problem is current default compiling option for debug did not tell me any coding error (succeffully compile and link) and the worse than that&amp;nbsp;is&amp;nbsp;it&amp;nbsp;gives&amp;nbsp;me wrong results. &lt;BR /&gt;&lt;BR /&gt;I am not arging on any specific option like /Qsave or /Qzero to be added to default option.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;As a user, I want to use it more simple and&amp;nbsp;easy. Either IVF told me where is&amp;nbsp;the error in my code if my code is wrong; or IVF give me correct results if it does not say&amp;nbsp;any wrong&amp;nbsp;on my code.&lt;BR /&gt;&lt;BR /&gt;The&amp;nbsp;worst thing is IVF did not say anything wrong and give the wrong results!&lt;BR /&gt;&lt;BR /&gt;User must check the complicated compiling option to figure&amp;nbsp;out&amp;nbsp;the reason!&amp;nbsp;</description>
      <pubDate>Tue, 14 Aug 2012 20:28:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767693#M20979</guid>
      <dc:creator>turkeydodo</dc:creator>
      <dc:date>2012-08-14T20:28:25Z</dc:date>
    </item>
    <item>
      <title>Different results in release mode and debug mode</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767694#M20980</link>
      <description>I agree with you that the compiler should be able to diagnose uninitialized variables better. It remains something we're interested in.&amp;nbsp; If you had Intel Fortran Studio and used the Static Analysis feature, it would probably have detected this.&lt;BR /&gt;&lt;BR /&gt;However, there are many coding errors the compiler cannot reliably detect.&amp;nbsp; It is not that the user must check the options, it's that the user should write correct code.&amp;nbsp; Uninitialized variables, or assuming SAVE semantics where the language does not specify it, is a coding error. That some other compiler hid the error from you doesn't make it any less of a coding error.</description>
      <pubDate>Tue, 14 Aug 2012 23:47:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767694#M20980</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2012-08-14T23:47:59Z</dc:date>
    </item>
    <item>
      <title>I have a similar problem. I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767695#M20981</link>
      <description>&lt;P&gt;I have a similar problem. I compared each options in release mode and debug mode. And when I am using Debug Multithreaded (/libs:static /threads /dbglibs) as&amp;nbsp;Runtime Library in Debug mode I get wrong answers. When I change this option to Multithreaded, then I get correct results. Do you have an idea why I have an issue like this?&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2014 23:01:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767695#M20981</guid>
      <dc:creator>Andac_L_</dc:creator>
      <dc:date>2014-04-28T23:01:44Z</dc:date>
    </item>
    <item>
      <title>Any similarity is likely to</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767696#M20982</link>
      <description>&lt;P&gt;The similarity that you mention is likely to be rather vague, as in "all buggy programs are similar". Noting this kind of similarity is worth next to nothing as far as locating and rectifying the problem is concerned.&lt;/P&gt;

&lt;P&gt;You could have code that causes array bounds to be exceeded, code containing mismatched subprogram arguments, and uninitialized variables. Finding and fixing such errors is time consuming, but there are some compiler options to help you with the task, some of which have been mentioned in this thread.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Apr 2014 23:23:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Different-results-in-release-mode-and-debug-mode/m-p/767696#M20982</guid>
      <dc:creator>mecej4</dc:creator>
      <dc:date>2014-04-28T23:23:00Z</dc:date>
    </item>
  </channel>
</rss>

