Are there any tools helping me with MPI programming?

Please note: The FAQ pages at the HPCVL website are continuously being revised. Some pages might pertain to an older configuration of the system. Please let us know if you encounter problems or inaccuracies, and we will correct the entries.

Standard debugging and profiling tools such as Sun Studio are designed for serial or multi-threaded programs. They do not handle multi-process runs very well.

Quite often, the best way to check the performance of an MPI program is timing it by insertion of suitable routines. MPI supplies a "wall-clock" routine called MPI_WTIME(), that lets you determine how much actual time was spent in a specific segment of your code. An other method is calling the subroutines ETIME and DTIME, which can give you information about the actual CPU time used. However, it is advisable to carefully read the documentation before using them with MPI programs. In this case, go to and search for "Sun Studio 12: Fortran Library Reference".

HPCVL also provides a package called the HPCVL Working Template (HWT), which was created by Gang Liu and has now reached version 5.3. The HWT provides 3 main functionalities:

  1. Maintenance of multiple versions of the same code from a single source file. This is very useful, if your MPI code is based on a serial code that you want to convert.
  2. Automatic Relative Debugging which allows you to use pre-existing code (for example the serial version of your program) as a reference when checking the correctness of your MPI code.
  3. Simple Timing which is needed to determine bottlenecks for parallelization, to optimize code, and to check its scaling properties.

The HWT is based on libraries and script files. It is easy to use and portable (written largely in Fortran). Fortran, C, C++, and any mixture thereof are supported, as well as MPI and OpenMP for parallelism. Documentation of the HWT is available. The package is installed on the Sunfire cluster in /usr/local/hwt.