Running programs with mpirun


Up: Programming Tools Next: Workstation clusters and the ch_p4 device Previous: Compiling and Linking without the Scripts

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.out 
to 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.



Up: Programming Tools Next: Workstation clusters and the ch_p4 device Previous: Compiling and Linking without the Scripts