Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Tugnoli__Matteo
Beginner
78 Views

Missing debug symbols with Intel Fortran and optimization

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
78 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.

 

Reply