<?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 Enable Stack Traces in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837339#M55867</link>
    <description>&lt;P&gt;Steve, Martyn,&lt;/P&gt;&lt;P&gt;Thanks for the responses!&lt;/P&gt;&lt;P&gt;I did try to remove the GenerateDebugInformation="true" linker setting, but it did not make any difference.&lt;/P&gt;&lt;P&gt;Let me give you more info about how my DLL works, that may shed more light...&lt;/P&gt;&lt;P&gt;.NET GUI front end iteratively calls:&lt;BR /&gt;C++/CLI executable that transitions into native code, calls _controlfp_s and _set_se_translator, and then calls the Fortran DLL exported subroutine;&lt;BR /&gt;Fortran DLL then performs various calcs&lt;/P&gt;&lt;P&gt;So here's an example of a crash that I get with the Fortran Console configuration (without the fancy GUI or C++/CLI stuff) and another one that I get with the DLL configuration...&lt;/P&gt;&lt;P&gt;Again, when I run this on the development machine with my PDB file in the location where it was created, the DLL crash doesn't get SymGetModuleInfo and SymGetLineFromAddr failures, and instead of 0x05153520 [?]:EEEEE() [0x00542F0D] I would get 0x05153520 MODULENAME:SUBROUTINENAME() [0x00542F0D]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;forrtl: error (65): floating invalid&lt;BR /&gt;Image PC Routine Line Source&lt;BR /&gt;GGGGGGG.exe 009F4049 _CCCCCC 1937 CCCCCC.FOR&lt;BR /&gt;GGGGGGG.exe 007007EC _AAA 1467 AAA.FOR&lt;BR /&gt;GGGGGGG.exe 004E05C1 _BBBBBB 107 BBBBBB.FOR&lt;BR /&gt;GGGGGGG.exe 004FE137 _DDDDDD 474 DDDDDD.FOR&lt;BR /&gt;GGGGGGG.exe 0042153A _MAIN__ 532 EEEEE.FOR&lt;BR /&gt;GGGGGGG.exe 00E50773 Unknown Unknown Unknown&lt;BR /&gt;GGGGGGG.exe 00E33C39 Unknown Unknown Unknown&lt;BR /&gt;kernel32.dll 7C817077 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Application crashed with error c00002b5: {EXCEPTION}&lt;BR /&gt;Multiple floating point traps.&lt;BR /&gt;0x05153520 [?]:EEEEE() [0x00542F0D]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x001B9AA8]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x0005DFC1]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x00086A47]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x00004C14]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x10005BE0 [?]:LoadDllReturn0IfOK() [0x000075AE] &amp;lt;&amp;lt;&amp;lt;~~~~ This is my C++/CLI function&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;</description>
    <pubDate>Thu, 22 Apr 2010 14:31:18 GMT</pubDate>
    <dc:creator>Nick2</dc:creator>
    <dc:date>2010-04-22T14:31:18Z</dc:date>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837336#M55864</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I'm trying to get stack traces every time my app crashes (eg. divide by zero). I have two configurations - one DOS, one DLL. The DOS one gives me a nicestack trace with no intervention, but the DLL, I use SEH.&lt;BR /&gt;&lt;BR /&gt;Somehow I ended up disabling optimizations, at least in theDLL version (not good), and I'm still not getting what I want from the DLL...Settings below.&lt;BR /&gt;&lt;BR /&gt;What I do get is DbgHelp.dll tries to load my .pdb file...in the directory where I originally compiled the .dll! So naturally, on every machine except the development machine, I can't get a nice stack trace when the DLL version crashes.&lt;BR /&gt;&lt;BR /&gt;Any idea what I'm doing wrong to disable optimization and not have stack trace info in my dll?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;(static library)&lt;BR /&gt;&lt;TOOL name="VFFortranCompilerTool" suppressstartupbanner="true" debuginformationformat="debugEnabled" localsavedscalarszero="true" floatingpointexceptionhandling="fpe0" flushdenormalresultstozero="true" traceback="true" boundscheck="true"&gt;&lt;/TOOL&gt;&lt;BR /&gt;&lt;BR /&gt;(DOS)&lt;BR /&gt;&lt;P&gt;&lt;TOOL name="VFFortranCompilerTool" suppressstartupbanner="true" debuginformationformat="debugEnabled" localsavedscalarszero="true" floatingpointexceptionhandling="fpe0" flushdenormalresultstozero="true" traceback="true" boundscheck="true"&gt;&lt;/TOOL&gt;&lt;/P&gt;&lt;P&gt;&lt;TOOL name="VFLinkerTool" linkincremental="linkIncrementalNo" suppressstartupbanner="true" subsystem="subSystemConsole" additionaldependencies="..\\generic\\Release\\generic.lib"&gt;&lt;/TOOL&gt;&lt;BR /&gt;&lt;BR /&gt;(DLL)&lt;/P&gt;&lt;P&gt;&lt;TOOL name="VFFortranCompilerTool" suppressstartupbanner="true" debuginformationformat="debugEnabled" localsavedscalarszero="true" floatingpointexceptionhandling="fpe0" flushdenormalresultstozero="true" traceback="true" boundscheck="true"&gt;&lt;/TOOL&gt;&lt;/P&gt;&lt;P&gt;&lt;TOOL name="VFLinkerTool" linkincremental="linkIncrementalNo" suppressstartupbanner="true" generatedebuginformation="true" subsystem="subSystemWindows" linkdll="true" additionaldependencies="..\\generic\\Release\\generic.lib"&gt;&lt;/TOOL&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 Apr 2010 01:56:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837336#M55864</guid>
      <dc:creator>Nick2</dc:creator>
      <dc:date>2010-04-21T01:56:45Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837337#M55865</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;One difference is in your link step for the DLL: GenerateDebugInformation="true", &lt;BR /&gt;which will link against debug versions of the libraries. This could explain the &lt;BR /&gt;behavior of attempting to load the .pdb file. The debug libraries should not be&lt;BR /&gt;available on non-development machines because the debug libraries are not &lt;BR /&gt;redistributable.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Steve D.&lt;BR /&gt;Intel Developer Support&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Apr 2010 19:59:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837337#M55865</guid>
      <dc:creator>Stephen_D_Intel</dc:creator>
      <dc:date>2010-04-21T19:59:48Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837338#M55866</link>
      <description>I'm not sure what you mean by the "DLL version" of your program.&lt;BR /&gt;To get a stack trace for floating-point exceptions such as divide-by-zero, you must unmask the exceptions (they are masked by default). You are doing that using the switch /fpe:0, or the equivalent property in the IDE. When your main program is compiled with this switch, the compiler inserts a call to set bits in the floating point control words to unmask divide-by-zero, overflow and floating invalid exceptions. However, this is not done for functions or subroutines other than the main program (it could cause a significant overhead if it was done for every call). So for your "DLL version", either ensure that it has a Fortran main program that is compiled with /fpe:0, or else unmask the desired exceptions by a call to the runtime library, such as FOR_SET_FPE, or by using the features of the IEEE_EXCEPTIONS module that was introduced in Fortran 2003. In thelatest compiler version, you may also use the option /fpe-all:0, which will unmask exceptions on entry to an individual subroutine, and restore the mask to its previous value on exit. This may incur some performance overhead.&lt;BR /&gt; Once exceptions are unmasked, the /traceback option should be sufficient to give astack traceafter a flaoting-pointexception, even for a non-debug build.</description>
      <pubDate>Thu, 22 Apr 2010 00:12:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837338#M55866</guid>
      <dc:creator>Martyn_C_Intel</dc:creator>
      <dc:date>2010-04-22T00:12:01Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837339#M55867</link>
      <description>&lt;P&gt;Steve, Martyn,&lt;/P&gt;&lt;P&gt;Thanks for the responses!&lt;/P&gt;&lt;P&gt;I did try to remove the GenerateDebugInformation="true" linker setting, but it did not make any difference.&lt;/P&gt;&lt;P&gt;Let me give you more info about how my DLL works, that may shed more light...&lt;/P&gt;&lt;P&gt;.NET GUI front end iteratively calls:&lt;BR /&gt;C++/CLI executable that transitions into native code, calls _controlfp_s and _set_se_translator, and then calls the Fortran DLL exported subroutine;&lt;BR /&gt;Fortran DLL then performs various calcs&lt;/P&gt;&lt;P&gt;So here's an example of a crash that I get with the Fortran Console configuration (without the fancy GUI or C++/CLI stuff) and another one that I get with the DLL configuration...&lt;/P&gt;&lt;P&gt;Again, when I run this on the development machine with my PDB file in the location where it was created, the DLL crash doesn't get SymGetModuleInfo and SymGetLineFromAddr failures, and instead of 0x05153520 [?]:EEEEE() [0x00542F0D] I would get 0x05153520 MODULENAME:SUBROUTINENAME() [0x00542F0D]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;forrtl: error (65): floating invalid&lt;BR /&gt;Image PC Routine Line Source&lt;BR /&gt;GGGGGGG.exe 009F4049 _CCCCCC 1937 CCCCCC.FOR&lt;BR /&gt;GGGGGGG.exe 007007EC _AAA 1467 AAA.FOR&lt;BR /&gt;GGGGGGG.exe 004E05C1 _BBBBBB 107 BBBBBB.FOR&lt;BR /&gt;GGGGGGG.exe 004FE137 _DDDDDD 474 DDDDDD.FOR&lt;BR /&gt;GGGGGGG.exe 0042153A _MAIN__ 532 EEEEE.FOR&lt;BR /&gt;GGGGGGG.exe 00E50773 Unknown Unknown Unknown&lt;BR /&gt;GGGGGGG.exe 00E33C39 Unknown Unknown Unknown&lt;BR /&gt;kernel32.dll 7C817077 Unknown Unknown Unknown&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Application crashed with error c00002b5: {EXCEPTION}&lt;BR /&gt;Multiple floating point traps.&lt;BR /&gt;0x05153520 [?]:EEEEE() [0x00542F0D]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x001B9AA8]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x0005DFC1]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x00086A47]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x05153520 [?]:EEEEE() [0x00004C14]&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;&lt;P&gt;0x10005BE0 [?]:LoadDllReturn0IfOK() [0x000075AE] &amp;lt;&amp;lt;&amp;lt;~~~~ This is my C++/CLI function&lt;BR /&gt;SymGetModuleInfo failed with error 7e: The specified module could not be found.&lt;BR /&gt;SymGetLineFromAddr failed with error 1e7: Attempt to access invalid address.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2010 14:31:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837339#M55867</guid>
      <dc:creator>Nick2</dc:creator>
      <dc:date>2010-04-22T14:31:18Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837340#M55868</link>
      <description>I believe that the second traceback, the one with the errors, is coming from the Visual C++ library. The Fortran traceback seems to be working properly. I'll be honest and say that I have never seen a traceback in the form you show with the [] characters.</description>
      <pubDate>Thu, 22 Apr 2010 15:34:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837340#M55868</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-22T15:34:35Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837341#M55869</link>
      <description>Steve,&lt;BR /&gt;&lt;BR /&gt;Yes! I am formatting andwriting the text outputin the second traceback (I need to store it for various purposes, so that's why getting it in the form of a MessageBox or Command Prompt output is not really useful). That's why I mentioned calling _set_se_translator. I am basically using the Microsoft/Windows dbghelp C++ library to walk the stack and create that output.&lt;BR /&gt;&lt;BR /&gt;Nick</description>
      <pubDate>Thu, 22 Apr 2010 16:39:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837341#M55869</guid>
      <dc:creator>Nick2</dc:creator>
      <dc:date>2010-04-22T16:39:55Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837342#M55870</link>
      <description>I see - I think. I am not familiar with using those interfaces. Are you sure the PDB file is relevant? As far as I know, version 11.1 and earlier does not use the PDB file for debug information by default. I would start with the failure of the SymGetModuleInfo call and see what's going on there.</description>
      <pubDate>Thu, 22 Apr 2010 17:53:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837342#M55870</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-22T17:53:38Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837343#M55871</link>
      <description>&lt;P&gt;Once I disabled Linker/GenerateDebugInfo as suggested earlier, the PDB file went away from my DLL release output folder.&lt;BR /&gt;&lt;BR /&gt;BUT, now, even on my development machine, I can't get the stack trace (SymGetModuleInfo fails). I did disable the "omit frame pointers" optimization.&lt;BR /&gt;&lt;BR /&gt;So let's try another theory: in what format is this info stored inside the DLL? Is it some Intel format thatrequires some Intel-equivalent function of SymGetModuleInfo and SymGetLineFromAddr ?&lt;/P&gt;</description>
      <pubDate>Thu, 22 Apr 2010 21:37:43 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837343#M55871</guid>
      <dc:creator>Nick2</dc:creator>
      <dc:date>2010-04-22T21:37:43Z</dc:date>
    </item>
    <item>
      <title>Enable Stack Traces</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837344#M55872</link>
      <description>Yes, the Intel compiler does store traceback info in an Intel-specific format. We supply the routine TRACEBACKQQ to read this. You can use this from your exception handler by supplying the Windows exception pointer. Traceback is independent of debug info.</description>
      <pubDate>Fri, 23 Apr 2010 00:37:41 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/Enable-Stack-Traces/m-p/837344#M55872</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2010-04-23T00:37:41Z</dc:date>
    </item>
  </channel>
</rss>

