LinuxCommandLibrary

mpiexec

Run parallel programs using MPI

SYNOPSIS

mpiexec [options] program [arguments]

PARAMETERS

-n
    Specify the number of processes to start. Required.

-np
    Alias for -n, specify the number of processes to start.

-host
    Specify the host to run processes on. Can be specified multiple times. May depend on the implementation.

-hostfile
    Specify a file containing a list of hosts to run processes on. May depend on the implementation.

-wdir
    Set the working directory for the processes. May depend on the implementation.

-prepend-rank
    Prepend the rank to stdout and stderr. May depend on the implementation.

--version
    Display version information.

--help
    Display help message.

DESCRIPTION

mpiexec is a utility for launching MPI (Message Passing Interface) programs. It distributes the execution of a single program across multiple processes, potentially on multiple nodes in a cluster or distributed computing environment. mpiexec handles the initial setup and execution of the MPI processes. It takes care of environment variables, process allocation, and communication channels. It's essential for running parallel applications that leverage the power of MPI.
The exact behavior of mpiexec can vary depending on the specific MPI implementation (e.g., Open MPI, MPICH) installed on the system. This entry aims to provide a general overview, but users should consult the documentation specific to their MPI environment for precise details and available options. The primary function is to provide process management for MPI jobs, making parallel computing accessible. It significantly simplifies the initiation and management of MPI based parallel applications, and is a core tool in high-performance computing environments. This is critical for achieving scalability and performance in applications that are designed to run in parallel.

CAVEATS

The specific options and their behavior may vary depending on the MPI implementation (Open MPI, MPICH, etc.) being used. Always refer to the documentation for your particular MPI environment for accurate and complete information.

RESOURCE MANAGEMENT SYSTEMS

In many cluster environments, mpiexec interacts with resource management systems like SLURM or PBS. These systems handle job scheduling and allocation of nodes. mpiexec then utilizes the allocated resources to launch the MPI processes.

ERROR HANDLING

Pay close attention to error messages from mpiexec. These messages often provide clues about configuration problems, network connectivity issues, or problems within the MPI application itself.

HISTORY

mpiexec evolved as a standard interface for launching MPI applications, allowing users to specify the number of processes and their placement across available resources. Early versions lacked standardization, leading to compatibility issues between different MPI implementations. Over time, efforts were made to harmonize mpiexec options and behavior, though variations persist. It has become a fundamental tool for parallel computing in scientific and engineering domains since MPI became mainstream.

SEE ALSO

mpirun(1), mpi(7)

Copied to clipboard