<?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 Force a break when program ends in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868802#M71495</link>
    <description>&lt;P&gt;If it is console application put PAUSE before end. Program will wait to key.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Another possibility is to run rogram like&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;program&amp;gt;logfile&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;and alloutput to screen will be orwarded to logfile where you can look at your debuging messages you pu to your code.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;if it is win32 window application you can use pause too or MessagBox&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Jakub&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2010 18:12:31 GMT</pubDate>
    <dc:creator>ZlamalJakub</dc:creator>
    <dc:date>2010-03-16T18:12:31Z</dc:date>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868801#M71494</link>
      <description>&lt;P&gt;Hello fundis&lt;/P&gt;
&lt;P&gt;I am working with a model that takes many hours to run, but stops unexpectedly before the end of the simulation period. I have no idea where or why in the simulation it stops, and though I can tell from the output at what time it does so that doesn't really help me pinpoint the problem.&lt;/P&gt;
&lt;P&gt;I would love to hear that there is a way, perhaps in some sneaky project setting, to force the code to break before it ends, whether it ends with error or not...&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2010 18:03:52 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868801#M71494</guid>
      <dc:creator>Stuart_M_</dc:creator>
      <dc:date>2010-03-16T18:03:52Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868802#M71495</link>
      <description>&lt;P&gt;If it is console application put PAUSE before end. Program will wait to key.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Another possibility is to run rogram like&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;program&amp;gt;logfile&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;and alloutput to screen will be orwarded to logfile where you can look at your debuging messages you pu to your code.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;if it is win32 window application you can use pause too or MessagBox&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Jakub&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2010 18:12:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868802#M71495</guid>
      <dc:creator>ZlamalJakub</dc:creator>
      <dc:date>2010-03-16T18:12:31Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868803#M71496</link>
      <description>Unfortunately pause won't really work for me because I don't know where the program is exiting. It could be crashing, exiting normally after being redirected by some error condition, or exiting normally but earlier than I expect for some as-of-yet unknown reason.
&lt;DIV&gt;&lt;SPAN style="font-family: Verdana, Arial, Helvetica, sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;I was just hoping that there might be a setting akin to, say, the Floating-Point Exception Handling in the Fortran Configuration Properties where one can specify that the code break for floating point exception errors rather than simply producing NaNs.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I'm interested in your "program&amp;gt;logfile" solution, however. Am I correct in assuming that you're implying I run the program via a batch file? I'm not very familiar with batch scripting but I have been running my model with the following batch file on occassion:&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;
&lt;DIV id="_mcePaste"&gt;erase RESTART.122&lt;/DIV&gt;
&lt;DIV id="_mcePaste"&gt;erase GHBFLOWS.DAT&lt;/DIV&gt;
&lt;DIV id="_mcePaste"&gt;erase FTLBIN.DAT&lt;/DIV&gt;
&lt;DIV id="_mcePaste"&gt;Debug\FTLOADDS.exe &amp;lt; ftlrunfiles.txt&lt;/DIV&gt;
&lt;DIV id="_mcePaste"&gt;&lt;/DIV&gt;
&lt;DIV id="_mcePaste"&gt;Can you suggest how I might incorporate the &amp;gt;logfile addition into this particular .bat?&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 16 Mar 2010 19:29:28 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868803#M71496</guid>
      <dc:creator>Stuart_M_</dc:creator>
      <dc:date>2010-03-16T19:29:28Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868804#M71497</link>
      <description>Debug\FTLOADDS.exe &amp;lt; ftlrunfiles.txt &amp;gt;logfile&lt;BR /&gt;&lt;BR /&gt;I am not familiar with using exceptions (my programs do not crash in that manner).&lt;BR /&gt;&lt;BR /&gt;Put write(*,*) to certain palces in your program to watch where problem occurs.&lt;BR /&gt;&lt;BR /&gt;Jakub</description>
      <pubDate>Tue, 16 Mar 2010 19:52:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868804#M71497</guid>
      <dc:creator>ZlamalJakub</dc:creator>
      <dc:date>2010-03-16T19:52:08Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868805#M71498</link>
      <description>If you run it from within the debugger, it should break on any error. You can also trigger a breakpoint by calling the Win32 API routine DebugBreak (USE KERNEL32.)</description>
      <pubDate>Tue, 16 Mar 2010 20:00:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868805#M71498</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-03-16T20:00:17Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868806#M71499</link>
      <description>Thanks Quba - that helped a lot</description>
      <pubDate>Wed, 17 Mar 2010 17:19:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868806#M71499</guid>
      <dc:creator>Stuart_M_</dc:creator>
      <dc:date>2010-03-17T17:19:20Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868807#M71500</link>
      <description>Another useful trick, if you are not using the debugger, is to set /traceback.&lt;BR /&gt;In the IDE, go to project properties/Fortran/Run-time/Generate Traceback Information and set to yes.&lt;BR /&gt;Then go to project properties/Fortran/Floating-Point/Floating-Point Exception Handling&lt;BR /&gt;and select "Underflow gives 0.0; Abort on other IEEE exceptions (/fpe:0)"&lt;BR /&gt;Your program should then give a traceback, which should include routine names and source line numbers, for most errors, including for floating-point exceptions which would otherwise just have generated NaNs and continued.Your programwill still exit, but at least you'd know where.</description>
      <pubDate>Sat, 20 Mar 2010 00:45:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868807#M71500</guid>
      <dc:creator>Martyn_C_Intel</dc:creator>
      <dc:date>2010-03-20T00:45:18Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868808#M71501</link>
      <description>Another really handy trick , if it's in a loop, is to &lt;BR /&gt;invoke "Break all" which will tell you where the program is&lt;BR /&gt;at the time you invoke it. You can then have it continue&lt;BR /&gt;execution from that point, and invoke it again as many&lt;BR /&gt;times as you need it.</description>
      <pubDate>Sun, 21 Mar 2010 16:35:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868808#M71501</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2010-03-21T16:35:03Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868809#M71502</link>
      <description>BTW, why does "close project" do nothing?&lt;BR /&gt;&lt;BR /&gt;To close a project you have to exit VS 2008, or open another one.&lt;BR /&gt;&lt;BR /&gt;Is this intentional?</description>
      <pubDate>Sun, 21 Mar 2010 16:42:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868809#M71502</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2010-03-21T16:42:23Z</dc:date>
    </item>
    <item>
      <title>Force a break when program ends</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868810#M71503</link>
      <description>Unfortunately, that does NOT catch an integer overflow, which could be the cause of&lt;BR /&gt;your problem.&lt;BR /&gt;&lt;BR /&gt;For example, if you multiply two integer(4) quantites together, even though they are&lt;BR /&gt;&lt;B&gt;postive,&lt;/B&gt; you may get a &lt;B&gt;negative&lt;/B&gt; result, and it is not trapped. The only way to catch that&lt;BR /&gt;is to test invidual computations, line by line.&lt;BR /&gt;&lt;BR /&gt;It's not clear to me if the INTEL instruction set has a provision for detecting it in hardware.&lt;BR /&gt;Maybe later processors can do that.&lt;BR /&gt;&lt;BR /&gt;So, is your program strictly floating point operations? One possible workaround is&lt;BR /&gt;to convert the F.P. variables to real(16). The range of those is really HUGE.</description>
      <pubDate>Sun, 21 Mar 2010 16:51:22 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Force-a-break-when-program-ends/m-p/868810#M71503</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2010-03-21T16:51:22Z</dc:date>
    </item>
  </channel>
</rss>

