To run an MPI program, use the mpirun command, which is located in
/usr/local/mpich-1.2.5/bin. For almost all systems,
you can use the command
mpirun -np 4 a.outto run the program a.out on four processors. The command mpirun -help gives you a complete list of options, which may also be found in Appendix Mpirun Usage .
On exit, mpirun returns the status of one of the processes, usually the process with rank zero in MPI_COMM_WORLD.