mpirun, a Portable Startup Script


Up: The mpich Programming Environment Next: Commands for compiling and linking programs Previous: Introduction

Each parallel computing environment provides some mechanism for starting parallel programs. Unfortunately, these mechanisms are very different from one another. In an effort to make this aspect of parallel programming portable as well, mpich contains a script called mpirun. This is script is partially customized during the configuration process when mpich is built. Therefore the actual ``source'' for mpirun is (for most devices) in the file mpirun.in in the mpich/util directory; some devices also have additional files in their source directories (e.g., mpid/ch_p4). The most common invocation of mpirun just specifies the number of processes and the program to run:

    mpirun -np 4 cpi 
the complete list of options for mpirun is obtained by running
    mpirun -help 
More details on using mpirun may be found in the Users Guide for mpich.



Up: The mpich Programming Environment Next: Commands for compiling and linking programs Previous: Introduction