Marmot is an MPI specification checker. In particular:
- Marmot is a library written in C++, which has to be linked to your application in addition to the existing MPI library.
- It will check whether your application conforms to the MPI standard and will issue warnings if there are errors or non-portable constructs.
- You do not need to modify your source code, you only need one additional process working as Marmot's debug server e.g.
mpiexec -n (p+1) ...
- Marmot's output is a human-readable text or HTML
- The tool can be configured via environment variables.
Marmot makes use of the so-called "profiling interface" defined in the MPI standard, i.e. it intercepts the MPI calls from the application for examination before they are passed to the underlying MPI implementation. Marmot maps MPI resources such as communicators, datatypes etc. to its own resources to keep track of proper construction and usage.
To compile your MPI codes with Marmot, use one of the following compiler wrappers (the wrapper is dependent on the source code language):
- marmotf77 (for Fortran 77 codes)
- marmotf90 (for Fortran90 codes)
- marmotcc (for C codes)
- marmotcxx (for C++ codes)
marmotcc -o foo foo.c
Once you have a compiled executable you execute it in the normal way except you need to add one additional MPI process as a debug server e.g. for a 2-process MPI job, you need to run with:
mpiexec -n (2+1) ./ foo
Prior to running, there are a number of environment variables that can be set to modify the behavior of Marmot. The most important variable is MARMOT_LOGFILE_TYPE
- setenv MARMOT_LOGFILE_TYPE 0 # select text-based output
- setenv MARMOT_LOGFILE_TYPE 1 # select html output
Please consult the userguide for details on the other environment variables.
Once your program terminates (either successfully or unsuccessfully), you will receive a Marmot text/html file in the running directory containing a report on your MPI code and whether it conforms to the MPI specification and its correct usage. Please review this report to identify MPI errors, misapplication and/or deadlocks etc.
See the official website: Marmot
The User Guide, v.2.4, may be found here