<?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 /Zi and /Z7 are inherited in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150782#M140018</link>
    <description>&lt;P&gt;/Zi and /Z7 are inherited from Microsoft. As such, there are subtle interactions with other things. I agree that the Intel documentation here is unclear.&lt;/P&gt;

&lt;P&gt;As I understand it: /Zi enables debugging, disables optimization (unless overridden, which you do), and puts symbol info in a PDB file. It sounds as if you want /Z7 instead to put the debug symbols in the object file.&lt;/P&gt;

&lt;P&gt;If you also say /debug:none, you'll get no symbols. /debug does not turn on any checks - maybe you're thinking of /dbglibs.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Mar 2018 22:25:16 GMT</pubDate>
    <dc:creator>Steve_Lionel</dc:creator>
    <dc:date>2018-03-08T22:25:16Z</dc:date>
    <item>
      <title>compiler flags for release with debug symbols</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150779#M140015</link>
      <description>&lt;P&gt;I am building a python extension that has to be supported on python 2.7 with f2py using the intel fortran compiler 2013, the latest I can use and still get the compatibility I need with vs 2008.&lt;/P&gt;

&lt;P&gt;My extension has a long history, but following a batch of changes now crashes python. I thought the first step would be to get some symbols or at least some line numbers and maybe check bounds. So I'm trying to create a "release with debug info" compile. However, when I recompile the static library with these changes, the bug goes away:&lt;/P&gt;

&lt;P class="yiv6414356063MsoNormal" id="yui_3_16_0_ym19_1_1520522075604_2289"&gt;From: ifort /c /nologo /MD /Ifortran_include /O2 /debug:none&lt;/P&gt;

&lt;P class="yiv6414356063MsoNormal"&gt;To: ifort /Zi /traceback /c /nologo /MD /Ifortran_include /O2&lt;/P&gt;

&lt;P class="yiv6414356063MsoNormal" id="yui_3_16_0_ym19_1_1520522075604_2291"&gt;I realize my compiler is a bit dated, but it would still be valuable to know the standard way to generate symbols without perturbing code and I doubt that has changed. I wasn't sure whether the /debug:none needs to be preserved or how it plays with the /Z* options but in any event adding it doesn't change anything.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 15:27:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150779#M140015</guid>
      <dc:creator>esatel</dc:creator>
      <dc:date>2018-03-08T15:27:10Z</dc:date>
    </item>
    <item>
      <title>My guess is that it's not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150780#M140016</link>
      <description>&lt;P&gt;My guess is that it's not necessarily that code has changed but that things have shifted about in memory. If you generate a link map for both versions you can compare them to see what, if anything, changed.&lt;/P&gt;

&lt;P&gt;When you say /Zi, you are telling the compiler to put debug info in a separate .pdb file rather than in the object file.&amp;nbsp; If I am reading the documentation correctly, /Zi implies /debug:full. /traceback also adds data to the executable - what happens if you leave that off?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 17:11:47 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150780#M140016</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-03-08T17:11:47Z</dc:date>
    </item>
    <item>
      <title>You were right that</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150781#M140017</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Y&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;ou were right that /traceback was the culprit altering the executable. When I remove that I get the crash again. &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;Is there an easy way to tell I have succeeded in getting symbols into the static library? Once I know that I have succeeded at that my issue becomes more of a python extension problem and less of an Intel Fortran problem&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;I was hoping the symbols would be in the object file and ultimately passed to the static library and from there linked into the python DLL (pyd file). The documentation I read for /Zi said "produce symbolic debug information in object file" . Do I have it wrong? Do I have to specify /nopdbfile?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Also I didn't see where it said /Zi implied /debug:full though of course I believe this is true Do I need to specify /debug:none?&amp;nbsp; Does /debug:none imply a larger process of checks, memory protection and de-tuning of the optimization or is it just symbols and possible rejiggering the memory?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;Thanks -- very helpful as usual.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 20:55:06 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150781#M140017</guid>
      <dc:creator>esatel</dc:creator>
      <dc:date>2018-03-08T20:55:06Z</dc:date>
    </item>
    <item>
      <title>/Zi and /Z7 are inherited</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150782#M140018</link>
      <description>&lt;P&gt;/Zi and /Z7 are inherited from Microsoft. As such, there are subtle interactions with other things. I agree that the Intel documentation here is unclear.&lt;/P&gt;

&lt;P&gt;As I understand it: /Zi enables debugging, disables optimization (unless overridden, which you do), and puts symbol info in a PDB file. It sounds as if you want /Z7 instead to put the debug symbols in the object file.&lt;/P&gt;

&lt;P&gt;If you also say /debug:none, you'll get no symbols. /debug does not turn on any checks - maybe you're thinking of /dbglibs.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 22:25:16 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150782#M140018</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-03-08T22:25:16Z</dc:date>
    </item>
    <item>
      <title>I have changed to /Z7 and</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150783#M140019</link>
      <description>&lt;P&gt;I have changed to /Z7 and removed /debug:none. If this is a legacy item and there is a preferred way I'd love to know. I'm not trying to do anything oddball and I hear you about interactions.&lt;/P&gt;

&lt;P&gt;The other thing that is pretty important is ... how do I determine success? How do I know that the symbols are in the static library? The reason I ask is that even with these changes it appears I am not getting any debug symbols in the python environment. I need to know whether I have the symbols in the static library to determine if this is an Intel Fortran issue or a python extension issue.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Mar 2018 23:21:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150783#M140019</guid>
      <dc:creator>esatel</dc:creator>
      <dc:date>2018-03-08T23:21:21Z</dc:date>
    </item>
    <item>
      <title>There isn't another way to do</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150784#M140020</link>
      <description>&lt;P&gt;There isn't another way to do this.&lt;/P&gt;

&lt;P&gt;As for how to tell if the symbols are in the object - I don't know of a surefire way. If you do a "dumpbin" on the .obj it will give you the size of the .debug$S and .debug$T image sections. From my experiments, the .debug$T section is where the symbols reside as it is smaller if I use /Zi. Also, I can check to see if a .pdb file was created. The .obj is definitely smaller with /Zi.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Mar 2018 00:57:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/compiler-flags-for-release-with-debug-symbols/m-p/1150784#M140020</guid>
      <dc:creator>Steve_Lionel</dc:creator>
      <dc:date>2018-03-09T00:57:50Z</dc:date>
    </item>
  </channel>
</rss>

