Intel® MPI Library
Get help with building, analyzing, optimizing, and scaling high-performance computing (HPC) applications.

Effect of -g on libmpi.so

David_B_9
Beginner
399 Views

I'm realizing that including -g in my compile statement causes my MPI C++ program executable to link with libmpi_dbg.so.4 rather than libmpi.so.4 (v13/impi/4.1.0.024/lib64). Can anyone explain exactly why that is so and whether there is necessarily an associated impact on performance?

A simple C++ code calling only MPI_Init compiled with mpicxx and with or without -g is sufficient to demonstrate the behavior.

0 Kudos
1 Reply
Gergana_S_Intel
Employee
399 Views

Hi David,

By using -g in your compile/link line, you're basically telling Intel MPI you want to link with the debugging version of our library (libmpi_dbg.so) which includes debug symbols embedded in the lib.  Details are in the Compiler Command Options section of our Reference Manual.

We haven't seen any major performance issues when linking with the debug Intel MPI.  The library will print a *lot* more additional information when I_MPI_DEBUG is enabled though.  Keep that in mind.  If you don't need to link with the debug version, you can simply leave the -g out of the compile line.

In later versions of Intel MPI (latest available is Intel MPI Library 5.1.2), we've actually included debug symbols in the regular libmpi.so there's no special need to link with -g.

I hope this helps.  Let me know if you have any specific questions about using our debug builds.

~Gergana

0 Kudos
Reply