Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

What is the down side to compiling code with "-g -O3" ??

Rene_S_1
Beginner
238 Views

 

Hi,

I am just trying to understand what the implication of compiling production codes with "-g -O3" would be.

Other than binary size being larger what is the downside of including the debug symbols on fortran binaries? Is there a performance penalty? If so roughly around 2%, 5%.?

I understand that debugging code with "-g -O3" is probably a bit difficult for a debugger as the code will probably get moved around by the compiler. I am not trying to debug codes that I know I have a bug on or that are reproducible with this.

I am only trying to this for cases when I have production codes that are running well but for some corner case the code hangs so I would like to attach to it and get some useful information from a debugger.  Some of these are not reproducible or they take to long to get to that point so being able to just attach and get some hint would be useful.

 

Thanks

Rene

 

 

 

 

 

0 Kudos
1 Reply
Steven_L_Intel1
Employee
238 Views

There's not really a performance penalty, other than larger executable size.

0 Kudos
Reply