If you get

mpicc: Command not found.

or something similar, your PATH doesn't contain the location of the MPI commands. You may need something like (for the MPICH implementation)

setenv PATH /usr/local/mpi/lib/sun4/ch_p4:/usr/local/mpi/bin:$PATH
rehash

or something similar. The exact path will depend on your MPI installation and the devices that you are using.

The MPI standard does not specify how MPI programs are compiled or run; this is up to the implementation. The examples here are for the MPICH implementation.

If your program runs, but runs with only one processor, you have be accessing an mpirun for a different version of MPI. Give the command


which mpirun

and make sure that the PATH given matches the one that cooresponds to the MPI implementation that you are using.