<?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 How do I track an infinite loop? in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764349#M19155</link>
    <description>&lt;P&gt;Dear Dr. Fortran -&lt;/P&gt;
&lt;P&gt;If I am debugging a Fortran program, and it appears to be "hung" in a loop, how do I find where the problem occurs? I don't get printout to help guide me.&lt;/P&gt;
&lt;P&gt;If I use Ctl-C to stop it, it &lt;STRONG&gt;breakpoints&lt;/STRONG&gt;, and I get a window with a lot of assembly code, but I don't get information as to &lt;STRONG&gt;where it was&lt;/STRONG&gt; when I interrupted it relative to the actual source code, what subroutine, what line, etc.&lt;/P&gt;
&lt;P&gt;Is there a way to interrupt it, and &lt;U&gt;tell where it was&lt;/U&gt;, then continue onward? If I do this several times, I can then determne where the loop was.&lt;/P&gt;
&lt;P&gt;Perhaps there is a way to set up a breakpoint handler for Ctl-C interrupts. Is there an article for that?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks; Bill S.&lt;/P&gt;</description>
    <pubDate>Fri, 02 Nov 2007 19:48:38 GMT</pubDate>
    <dc:creator>WSinc</dc:creator>
    <dc:date>2007-11-02T19:48:38Z</dc:date>
    <item>
      <title>How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764349#M19155</link>
      <description>&lt;P&gt;Dear Dr. Fortran -&lt;/P&gt;
&lt;P&gt;If I am debugging a Fortran program, and it appears to be "hung" in a loop, how do I find where the problem occurs? I don't get printout to help guide me.&lt;/P&gt;
&lt;P&gt;If I use Ctl-C to stop it, it &lt;STRONG&gt;breakpoints&lt;/STRONG&gt;, and I get a window with a lot of assembly code, but I don't get information as to &lt;STRONG&gt;where it was&lt;/STRONG&gt; when I interrupted it relative to the actual source code, what subroutine, what line, etc.&lt;/P&gt;
&lt;P&gt;Is there a way to interrupt it, and &lt;U&gt;tell where it was&lt;/U&gt;, then continue onward? If I do this several times, I can then determne where the loop was.&lt;/P&gt;
&lt;P&gt;Perhaps there is a way to set up a breakpoint handler for Ctl-C interrupts. Is there an article for that?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Thanks; Bill S.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2007 19:48:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764349#M19155</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2007-11-02T19:48:38Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764350#M19156</link>
      <description>&lt;P&gt;BTW, I did experiment with other "traps." It works fine for divide by zero, or FP overflow, etc. I get the line where it occurred, and it shows me the source code at that point.&lt;/P&gt;
&lt;P&gt;The only one that gives me trouble is the Ctl-C traps mentioned above. Why do those behave differently?&lt;/P&gt;
&lt;P&gt;I am trying to avoid sticking in a bunch of Print statements if possible.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Nov 2007 21:18:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764350#M19156</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2007-11-02T21:18:05Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764351#M19157</link>
      <description>When it breaks, use the call stack pane (usually in the lower right) and you should see a call from your code somewhere down the list. Click on that entry and the source display will show you the offending point.&lt;BR /&gt;</description>
      <pubDate>Sat, 03 Nov 2007 00:29:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764351#M19157</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-11-03T00:29:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764352#M19158</link>
      <description>&lt;P&gt;Bill,&lt;/P&gt;
&lt;P&gt;Most debuggers have a Pause button if your application was launced with debugger. The pause buttion in Visual Studio Debugger looks like &lt;FONT size="1"&gt;&lt;STRONG&gt;||&lt;/STRONG&gt;&lt;/FONT&gt; (pause key on video cassette recorder).&lt;/P&gt;
&lt;P&gt;If not running from debugger, then most debuggers have an Attach to Process feature. You can use this to attach to a running process then press Pause (if it doesn't pause automatically).&lt;/P&gt;
&lt;P&gt;Hopefully the hangup is in your application code.&lt;/P&gt;
&lt;P&gt;However, if it is stuck inside a loop in a runtime libraryDLL then a stack trace may be hard to follow (as the stack frame is often not preserved into the DLL).You should be able to see the routine names in the DLL (if DLL has debug info). Knowing what was called may point you in the right direction into your code. The usual culprit of a hang inside a runtime library would be an interlock condition. Is your application multi-threaded?&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sun, 04 Nov 2007 01:48:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764352#M19158</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-11-04T01:48:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764353#M19159</link>
      <description>&lt;P&gt;Hi Jim and Steve;&lt;/P&gt;
&lt;P&gt;Thank for your replies. I tried what you suggested - -&lt;/P&gt;
&lt;P&gt;I get a call stack frame, but all the address are in HEX, so I don't know how to associate those with actual subroutine names and line numbers. This what I see: &lt;/P&gt;
&lt;DIV&gt;&amp;gt;kernel32.dll!7c87534d() &lt;BR /&gt;[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]&lt;BR /&gt;kernel32.dll!7c87534d() &lt;BR /&gt;kernel32.dll!7c80b683() &lt;BR /&gt;kernel32.dll!7c875290() &lt;/DIV&gt;
&lt;DIV&gt;-------------------------------------------------------------------------------------&lt;/DIV&gt;
&lt;DIV&gt;Apparently there are no symbols for the &lt;STRONG&gt;kernel32.dll&lt;/STRONG&gt;, that's the hangup.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Re: the Pause button, I tried that, but it is &lt;U&gt;ignored &lt;/U&gt;unless I press the CTL key at the same time. Then it behaves just like the Ctl-Cinterrupt I mentioned earlier, but it says "Control Break interrupt" instead.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I guess without the debug symbols I would have to delve into a memory storage map to see what the HEX addresses correspond to. How do I generate said storage map? Thedisassembly does &lt;STRONG&gt;not&lt;/STRONG&gt; give line addresses though, so it still could be tedious.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;BTW, this is a simple non-threaded application.&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;Thanks; Bill S.&lt;BR /&gt;&lt;/DIV&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Nov 2007 18:43:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764353#M19159</guid>
      <dc:creator>WSinc</dc:creator>
      <dc:date>2007-11-04T18:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764354#M19160</link>
      <description>&lt;P&gt;Calls into kernel32 can go very deep. You should have a scroll elevator button on the call stack sub-window. Scroll down (drag down) to the bottom. You should see some of your code names at the bottom of the stack.&lt;/P&gt;
&lt;P&gt;The Pause button refered to is not the keyboard Pause button. Rather the button I referred to is a control button on the debugger window. This is the one with the two short vertical bars.&lt;/P&gt;
&lt;P&gt;Jim Dempsey&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 04 Nov 2007 19:34:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764354#M19160</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2007-11-04T19:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: How do I track an infinite loop?</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764355#M19161</link>
      <description>If all you see is kernel32.dll lines, then your code is not showing. What version of the compiler are you using? I know that some older versions had a run-time library that did not save the stack frame properly.&lt;BR /&gt;</description>
      <pubDate>Sun, 04 Nov 2007 22:24:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-do-I-track-an-infinite-loop/m-p/764355#M19161</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2007-11-04T22:24:23Z</dc:date>
    </item>
  </channel>
</rss>

