How to compile and run simple MPI based C programs on UNIX: 1. compile: mpicc -c foo.c mpicc -o foo foo.o This should be done in two steps, the first one creates the object code; the second one links library, if any and generates the executable. If there is no library to be used, simply do mpicc -o foo foo.o 2. execute the code mpirun -np x foo where 'x' is the number of processes desired. For example, if one would like to have three processes running, the command would be mpirun -np 3 foo indicate any parameters passed to the applications program (in this case, foo). To execute the program, you also need to set up two files. One file is in your home directory. It is called .rhosts which should contain the name of the hosts that can remotely execute program. For example, if you want your program to be executed on zappa, then your .rhosts should look like this: zappa if you want the programs to be executed on zappa and mesquite, .rhosts mesquite zappa The same file contents should be put in a file called 'machines' in the directory where your program is.