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

IntelMPI and gprof

unrue
Beginner
1,133 Views
Dear IntelMPi user,
is it possible to use gprof under IntelMPi 4.0? I compiled my code with "-pg " and exported GMON_OUT_PREFIX variable,
but i don't see any gmon profiling outfile at the end of execution.
Thanks in forward.
0 Kudos
2 Replies
TimP
Honored Contributor III
1,133 Views
If you add -pg to both your compile and link options, gmon.out data should be generated at normal termination, according to the file system environment for each process (not necessarily the same environment where you launched MPI). There would be a file system race among processes running gprof in the same directory, but you can often get useful data. You may get data from static linked functions which weren't built with -pg, but no call graph. Execution time associated with IMPI functions is spread more broadly in 4.0 than 3.2.2, and will be affected by your SPIN environment settings.
0 Kudos
Dmitry_K_Intel2
Employee
1,133 Views
It seems to me that it would be better to use a special tool. Something like Intel Trace Analyzer and Collector.
Of cause it depends on the purposes of your profiling. As the first step you can try to use I_MPI_STATS environment variable (look for stats.txt file)

Regards!
Dmitry
0 Kudos
Reply