threaded and multi
My recently developed application uses multiple processors which communicate via the Message Passing Interface standard, while some parts involve several threads running asynchronously ( std::async
).
I'm running Ubuntu 12.04 x86 with g++-4.6.3 in combination with openMPI.
Adding the -p -g -pg
to the compiler flags and running gprof doesn't produce any useful output, it basically says everything was done in no time.
How to profile such programs?
I suggest Allinea MAP for this, developed by my employer. It profiles MPI applications and shows you where in your source code is costing your application time. There are some very useful graphs of memory usage, MPI communication and compute costs - and it allows you to zoom in on problem areas for performance easily.
You don't have to recompile your application to get started with it: it automatically adds profiling at runtime.
It is commercial software - but there is a 30 day trial.
For multi-threaded programs, there is no need to bring out the big MPI profile guns. I use Intel's VTune, and it does an excellent job at profiling multiple threads. You can get a 30 day trial.
链接地址: http://www.djcxy.com/p/40334.html上一篇: Linux中的C ++线程
下一篇: 多线程和多线程