MPICH is a freely available, portable implementation of MPI, the standard for message-passing libraries.
Building Your Applications
To build applications with MPICH, you should replace direct references to compilers (gcc, g77, etc.) with references to the appropriate MPICH wrapper scripts (mpicc, mpif77, etc.). The wrapper scripts are intended to supply correct include and library paths and options automatically. The wrapper script names are:
mpiccthe C compiler wrapper for
mpif77the Fortran 77 compiler wrapper for
mpif90the Fortran 90 compiler wrapper for
mpiCCthe C++ compiler wrapper for
To troubleshoot problems compiling with a wrapper script, use the
-show argument to see what commands it is executing, and try executing those commands manually. Try running
mpicc -show alone to see the general effect of the wrapper script. Here's an example:
% mpicc -show test.c -o test gcc -DUSE_STDARG -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_UNISTD_H=1 -DHAVE_STDARG_H=1 -DUSE_STDARG=1 -DMALLOC_RET_VOID=1 -L/usr/local/mpich/220.127.116.11/gcc/i686/lib test.c -o test -lmpich
Running Your Applications
Start MPICH programs using the
mpirun wrapper script.
The most common
mpirun arguments are briefly described below:
||Request quantity N processors.|
||Do not run the job on the local node (example: master).|
||Show what mpirun would do, but don't actually do it. Useful for troubleshooting.|
For more information, please read
man mpirun. Also note that some options have no effect on execution because they don't apply to the cluster's configuration.