22

I'm using MPI and I want to measure the communication costs, so that I can then compare them to the 'processing' costs, e.g., how much time do I need to scatter a list through n processes and then compare it to how much time I need to sort it.

Does anyone know any tools to measure this communication costs? (the scatter for example)

Is there anything to make measurements on MPI communication costs like there is, for example, PAPI to analyse code performance?

Thanks in advance!

dx_mrt
  • 707
  • 7
  • 13

1 Answers1

28

Yes, there's lots of such tools. MPI defines a tools interface that allows other libraries to interject themselves at your MPI function calls, and do counts, timing, etc.

A very small MPI profiling tool is mpiP - it gives a very short summary of MPI activity in your code.

The IPM library is fairly easy to build and gives you lots of MPI counts and times, and gives a nice HTML file as a result. You mention PAPI; IPM will also integrate PAPI counters if available. We use this regularly at our centre, and I think this would do what you like. If you've built your program with dynamic libraries for MPI, you don't even need to recompile to use this (mpiP has the same property).

Jumpshot, which comes with MPICH2 but can be built with any MPI, actually shows on a timeline how long each MPI operation took.

OpenSpeedshop gives very detailed performance measurements of your code, highlighting especially "expensive" lines; it also has an MPI-tracing mode which will identify MPI times by line of code. It can be tricky to install.

On the commercial part of the spectrum there are Vampir from TU Dresden and Intel Trace Analyzer and Collector (ITAC). Vampir collects source-level, MPI and OpenMP traces using the open source VampirTrace library that also integrates with PAPI to provide detailed event and counter tracing. VampirTrace's traces are in Open Trace Format that could be read by various other tools besides Vampir.

ITAC is part of Intel Cluster Studio XE. It is mostly designed to work with Intel MPI and sharing the same ancestral code with Vampir, provides more or less the same functionality. One of its nice features is the included automatic run-time MPI correctness checker.

Allinea MAP is an MPI profiler from Allinea that provides performance analysis with an integrated source browser that displays the communication/computation cost alongside individual lines of the source code. It also shows high-level graphs of performance information, including memory, CPU instructions and communication.

But there are other higher level tools which not only give reports, but actually offer advice. TACC's perfexpert is a command-line based tool which takes a number of measurements and offers some performance tuning advice. Scalasca out of Jülich, recompiles your code with a lot of source-level instrumentation and can point out load imbalances, particularly expensive MPI collectives, etc. It can also integrate with Vampir for detailed trace analysis.

David
  • 756
  • 5
  • 10
Jonathan Dursi
  • 50,107
  • 9
  • 127
  • 158
  • 1
    I would add [Vampir](http://www.vampir.eu/) from TU Dresden and Intel Trace Analyzer and Collector. Both descend from the same ancestor and are excellent and sophisticated tools for performance analysis of MPI and OpenMP traces but unfortunately are commercially licensed. Scalasca is open source but not really suited for low-level detailed analysis and for that it integrates with Vampir (integration requires valid Vampir license). [XMPI](http://www.lam-mpi.org/software/xmpi/) used to be distributed with LAM but is not actively developed since LAM merged with Open MPI. – Hristo Iliev May 15 '12 at 22:07
  • Yes, they're great; I mainly didn't add them because they're commercial. Do you think it would be useful to change this to a community wiki and just have everyone add their suggestions? – Jonathan Dursi May 15 '12 at 22:11
  • Wow! Thank you very much to both of you! Just one more question, since I'd prefer to do the measurements in the cluster I'm using and I don't have admin permissions, is it possible to install one of this programs in my directory? Apart from mpiP which is already installed. IPM seems to be installable without admin privileges, am i right? Thanks! – dx_mrt May 15 '12 at 23:26
  • @dx_mrt: I think all of them should in principle be installable without admin privs, unless maybe ITAC uses a kernel module for something. Many configure scripts assume you're root and are writing to /usr or some such but by installing to another prefix (eg, your home dir) you should be fine. IPM should certainly be ok. – Jonathan Dursi May 15 '12 at 23:31
  • I've also made this a wiki so people can add other tools I've missed; I'll let @HristoIliev add ITAC / Vampir. – Jonathan Dursi May 15 '12 at 23:32
  • @JonathanDursi: Yes, they are commercial, but are still great tools (if not best in the class). I use them through site licenses and guess that many other students and researchers worldwide might have them on their sites. So thank you for making your answer a community wiki - we should not assume anything about the people visiting SO and should present them all the options and let them choose. – Hristo Iliev May 16 '12 at 05:23