Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
The Intel sign-in experience is changing in February to support enhanced security controls. If you sign in, click here for more information.
27553 Discussions

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

Rene_S_1
Beginner
146 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
146 Views

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

Reply