next up previous
Next: The MPE Library of Up: The mpich Programming Environment Previous: Introduction

   
mpirun, a Portable Startup Script

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 in the file mpirun.in in the mpich/bin directory. 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
This is the result:
mpirun [mpirun_options...] <progname> [options...]

  mpirun_options:
    -arch <architecture>
            specify the architecture (must have matching machines.<arch>
            file in /home/lusk/mpitest/mpich/util/machines) if using the execer
    -h      This help
    -machine <machine name>
            use startup procedure for <machine name>
            Currently supported:
              chameleon
              meiko
              paragon
              p4
              sp1
              ibmspx
              anlspx
              ksr
              sgi
              i860
              inteldelta
              cray_t3d

    -machinefile <machine-file name>
            Take the list of possible machines to run on from the
            file <machine-file name>
    -np <np>
            specify the number of processors to run on
    -nolocal
            don't run on the local machine (only works for 
            p4 and ch_p4 jobs)
    -e      Use execer to start the program on workstation
            clusters
    -pg     Use a procgroup file to start the p4 programs, not execer
            (default)
    -leave_pg
            Don't delete the P4 procgroup file after running
    -t      Testing - do not actually run, just print what would be
            executed
    -v      Verbose - throw in some comments
    -dbx    Start the first process under dbx where possible
    -nopoll Do not use a polling-mode communication.
            Available only on IBM SPx.
For backward compatibility with earlier versions of mpirun, each of these arguments can also be used with the prefix mr_, as in
    mpirun -mr_np 4 myprog



Karen D. Toonen
1998-11-19