<?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 The #pragma omp directives in Software Archive</title>
    <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113889#M80370</link>
    <description>&lt;P&gt;The #pragma omp directives are the culprits. Now to figure out how to debug multithreaded apps in GDB...!&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2016 10:09:29 GMT</pubDate>
    <dc:creator>Kevin_W_3</dc:creator>
    <dc:date>2016-05-03T10:09:29Z</dc:date>
    <item>
      <title>Some functions missing debug information, but not all</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113888#M80369</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I am trying to debug a C++ application with gdb-ia, but some functions are missing debug information (while other functions are ok).&lt;/P&gt;

&lt;P&gt;All files are compiled with the same compiler options.&amp;nbsp;&lt;SPAN style="font-size: 1em; line-height: 1.5;"&gt;This is an extract from the Makefile:&lt;/SPAN&gt;&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;CC=icc

CFLAGS=-I../cpp_src -O0 -debug all -g -W -Wall -fPIC -march=native -fast -ansi-alias \
                        -fopenmp -finline -funroll-loops -no-prec-div -qopt-prefetch -unroll-aggressive \
                        -m64 -auto-ilp32 -I../src -xCORE-AVX2 -mkl -fma -I/opt/local/include/

LDFLAGS=-L/opt/local/lib -O0 -debug all -g -fopenmp -lboost_system-mt -lboost_timer-mt -lstdc++
&lt;/PRE&gt;

&lt;P&gt;When starting the executable in gdb-ia, there is no debug information at the first line of "main", (i.e. "step" results in a warning about no line number information, and the function runs to completion), but breakpoints in other places do stop on a line with valid source.&lt;/P&gt;

&lt;P&gt;If I strip all source from the Makefile, and reduce main.cpp it to a simple one-liner, it eventually does debug properly.&lt;/P&gt;

&lt;P&gt;Is there something obvious I've missed (I have not used icc before)? If it is important, this example makes use of AVX2 instructions, #pragma unroll's, and #pragma omp directives.&lt;/P&gt;

&lt;P&gt;Many thanks,&lt;/P&gt;

&lt;P&gt;Kevin&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 09:21:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113888#M80369</guid>
      <dc:creator>Kevin_W_3</dc:creator>
      <dc:date>2016-05-03T09:21:57Z</dc:date>
    </item>
    <item>
      <title>The #pragma omp directives</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113889#M80370</link>
      <description>&lt;P&gt;The #pragma omp directives are the culprits. Now to figure out how to debug multithreaded apps in GDB...!&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 10:09:29 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113889#M80370</guid>
      <dc:creator>Kevin_W_3</dc:creator>
      <dc:date>2016-05-03T10:09:29Z</dc:date>
    </item>
    <item>
      <title>Hello Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113890#M80371</link>
      <description>&lt;P&gt;Hello Kevin,&lt;/P&gt;

&lt;P&gt;when you set a breakpoint near an OpenMP directive/pragma you might step into the OpenMP runtime (look out for calls into __kmpc*). The warnings then are because the sources are not found for the OpenMP runtime, which is OK. I guess you used "step" instead of "next" - the latter jumps over any call/jump and hence would not follow execution into the OpenMP runtime.&lt;/P&gt;

&lt;P&gt;You should be always able to set breakpoints at code that you've compiled with the above compiler/linker options. However, calls into external libraries might not always have debug information (i.e. OpenMP runtime) .&lt;/P&gt;

&lt;P&gt;I'm not sure why the function runs to completion when stepping... for understanding that I'd need some more information, like an example, disassembly, etc.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Georg Zitzlsberger&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2016 13:56:30 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113890#M80371</guid>
      <dc:creator>Georg_Z_Intel</dc:creator>
      <dc:date>2016-05-03T13:56:30Z</dc:date>
    </item>
    <item>
      <title>Hello Georg</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113891#M80372</link>
      <description>&lt;P&gt;Hello Georg&lt;/P&gt;

&lt;P&gt;Thanks very much for your reply. I actually found, by elimination, that the "-fast" compiler option caused the issues with missing symbols, not the #pragma omp directives.&lt;/P&gt;

&lt;P&gt;For now I am able to debug OK.&lt;/P&gt;

&lt;P&gt;Many thanks, Kevin&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 07:38:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113891#M80372</guid>
      <dc:creator>Kevin_W_3</dc:creator>
      <dc:date>2016-05-04T07:38:10Z</dc:date>
    </item>
    <item>
      <title>Hello Kevin,</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113892#M80373</link>
      <description>&lt;P&gt;Hello Kevin,&lt;/P&gt;

&lt;P&gt;-fast is (currently) an alias for a set of options:&lt;BR /&gt;
	&lt;SPAN class="option"&gt;-ipo&lt;/SPAN&gt;, &lt;SPAN class="option"&gt;-O3&lt;/SPAN&gt;, &lt;SPAN class="option"&gt;-no-prec-div&lt;/SPAN&gt;, &lt;SPAN class="option"&gt;-static&lt;/SPAN&gt;, &lt;SPAN class="option"&gt;-fp-model fast=2&lt;/SPAN&gt;, and &lt;SPAN class="option"&gt;-xHost&lt;/SPAN&gt;&lt;BR /&gt;
	See also: &lt;A href="https://software.intel.com/en-us/node/581705"&gt;https://software.intel.com/en-us/node/581705&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;If you first specify -O0 and then later in the option set -fast, it sets -O3 (because of -fast contains -O3). This enables high performance optimizations and as such stepping in general appears to be random due to various optimizations.&lt;/P&gt;

&lt;P&gt;I somehow overlooked that in your original post.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;/P&gt;

&lt;P&gt;Georg Zitzlsberger&lt;/P&gt;</description>
      <pubDate>Wed, 04 May 2016 08:42:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113892#M80373</guid>
      <dc:creator>Georg_Z_Intel</dc:creator>
      <dc:date>2016-05-04T08:42:00Z</dc:date>
    </item>
    <item>
      <title>Hi</title>
      <link>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113893#M80374</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I got some errors after trying to make a c++ project using icc compiler&lt;/P&gt;&lt;P&gt;as part of Makefile&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CC=icc&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;CFLAGS=-I../cpp_src -W -Wall -O3 -march=native -fast -ansi-alias \&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;-fopenmp -finline -funroll-loops -no-prec-div -qopt-prefetch -unroll-aggressive \&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;-m64 -auto-ilp32 -I../src -xCORE-AVX2 -fma -mkl -I/opt/local/include/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;LDFLAGS=-L/opt/local/lib -fopenmp -lboost_system-mt -lboost_timer-mt -mkl -lPcmMsr&lt;BR /&gt;#&lt;BR /&gt;EXEC=main.icc&lt;BR /&gt;#CFLAGS=-Wa,-q -I../cpp_src -W -Wall -ansi -pedantic -O3 -Wall -funroll-loops -ftree-vectorize \&lt;BR /&gt;#&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;-msse4a -march=native -mtune=native -ffast-math -fopenmp \&lt;BR /&gt;#&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;-fstrict-aliasing -fprefetch-loop-arrays -I../src&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;after running 'make'&amp;nbsp; command I got the following messages in the terminal:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[LINKING] main.icc&lt;BR /&gt;ipo: warning #11012: unable to find -lboost_timer-mt&lt;BR /&gt;ipo: warning #11012: unable to find -lPcmMsr&lt;BR /&gt;ipo: warning #11021: unresolved _ZTVN10__cxxabiv117__class_type_infoE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Referenced in /tmp/ipo_icchW4mOn.o&lt;BR /&gt;ipo: warning #11021: unresolved __cxa_pure_virtual&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Referenced in /tmp/ipo_icchW4mOn.o&lt;BR /&gt;ipo: warning #11021: unresolved _ZdlPv&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Referenced in /tmp/ipo_icchW4mOn.o&lt;BR /&gt;ipo: warning #11021: unresolved _ZTVN10__cxxabiv120__si_class_type_infoE&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Referenced in /tmp/ipo_icchW4mOn.o&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I knew that there is something wrong in referring to&amp;nbsp; &lt;EM&gt;-lboost_system-mt -lboost_timer-mt&amp;nbsp;&amp;nbsp; &lt;/EM&gt;but I am not sure how to resolve the problem&lt;/P&gt;&lt;P&gt;could you please help me out with this issue.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Madjid&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Apr 2019 13:56:54 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Archive/Some-functions-missing-debug-information-but-not-all/m-p/1113893#M80374</guid>
      <dc:creator>belaid__abdelmadjid</dc:creator>
      <dc:date>2019-04-15T13:56:54Z</dc:date>
    </item>
  </channel>
</rss>

