Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5137 Discussions

Missing debug symbols with Intel Fortran and optimization

Tugnoli__Matteo
Beginner
560 Views

Hello everyone, 

I am trying to profile my application with VTune Amplifier 2018.

If I compile my application with GCC everything works fine. However with Intel fortran and optimizations higher or equal to -O1 VTune fails to find the debug symbols, i.e. compiling with

-g -O2

fails to find the debug symbols, and so cannot display the source code of the functions, while using

-g -O0 

works fine. If I collect data with the optimized code, then recompile with -g -O0 and then re-resolve the collected data, debug symbols are found correctly, however it is quite inconvenient. 

How can I get both an optimized executable and correct debug symbols compiling with intel fortran?

0 Kudos
1 Reply
Denis_M_Intel
Employee
560 Views

Hello,
 What compiler version is it? Can you check that addr2line Linux utility is able to show function names and source lines for the binary file built with -O2? Can you reproduce the issue on another (some "hello word" application) and attach it? 

 Re-resolving VTune result with recompiled binaries is not recommended because it could lead to wrong attribution of performance data to functions and source lines.

 

0 Kudos
Reply