MPI Commands | mpirun (1MPI) |
mpirun - start MPI processes in a cluster
mpirun -np nprocs [-c configuration-file] [-debug level] [-restart] [-ckptdir dir] [-nounix] [-arch arch] program ...
mpirun -client client address:port -np nprocs [-c configuration-file] [-debug level] [-restart] [-ckptdir dir] [-nounix] [-arch arch] program ...
The first synopsis runs MPI processes for a single cluster. The host names to run processes on are taken from the configuration file.
The second synopsis with -client option runs MPI processes for multiple clusters. The option specifies the IP address (IPv4) and the port number of the impi-server process which should be started in advance. The -np option specifies the number of processes in a local cluster.
mpirun command only invokes local MPI processes in a cluster, and the -np option specifies the number of local processes. The host names to run processes on are taken from a configuration file as the first synopsis, which needs only include local hosts. The clusters exchange information about the total number of processes and host addresses by themselves via the IMPI server in the startup stage.
The following options are supported:
The word client means for each cluster in a single job, following the IMPI specification.
MPI process ranks in clusters will be given contiguously, and processes in a cluster with lesser client number will have lesser ranks. Thus, cleint 0 includes rank 0.
This is specified in the IMPI specification, where the command is named as impirun instead of normal mpirun.
The mpirun returns the return code from the process of the lowest rank which has normally exited. Exceptional exits from the processes are reported in the stderr, but not counted. No process exits normally, 255 is returned.
% mpirun -np 8 a.out
This starts eight processes in a cluster.
% mpirun -np 8 -c mpi_conf a.out
This starts eight processes using the host list in the file mpi_conf.
% export IMPI_AUTH_NONE=0 % impi-server -server 2 & % mpirun -client 0 192.168.1.10:5678 -np 4 -c mpi_conf1 a.out & % mpirun -client 1 192.168.1.10:5678 -np 4 -c mpi_conf2 a.out
This starts two sets of four processes each (total eight) using the host lists in the files mpi_conf1 and mpi_conf2. The IP address is the one output from running impi-server. Normally, two runs of mpirun are started on different clusters.
Setting the environment variable IMPI_AUTH_NONE (to any value) specifies not to use any authentication, where it is one of the two authentication methods defined in the IMPI standard.
mpirun invokes mpifork command in YAMPII to start processes in a cluster. mpifork uses normal RSH/SSH to start processes. mpifork is a standalone program and has many options settable via environment variables. Refer to the description of mpifork for its specific behavior.
mpirun invokes a vendor-supplied MPI invoker program in the vendor MPI configuration, with slightly changing option naming. Refer to MPI manuals from vendors for their specific behavior.
Configuration Key Invoker Command Vendor no mpifork GridMPI (YAMPII) ibmmpi poe IBM fjmpi /opt/FJSVmpi2/bin/mpiexec Fujitsu mpich $MP_PREFIX/bin/mpirun MPICH mpich2 $MP_PREFIX/bin/mpiexec MPICH2 intelmpi $MP_PREFIX/bin/mpiexec Intel NOTE: Configuration Key is a word passed to --with-vendormpi.