Linux command
mpirun 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Run MPI program
mpirun -np [4] [program]
Run on multiple hosts
mpirun -np [8] --hostfile [hosts.txt] [program]
Run with specific slots per host
mpirun -np [4] --map-by node [program]
说明
mpirun launches MPI parallel programs. Starts multiple processes across nodes for distributed computing. Part of OpenMPI or MPICH implementations.
参数
- -np _n_
- Number of processes.
- --hostfile _file_
- File with host list.
- --host _hosts_
- Comma-separated hosts.
- --map-by _policy_
- Process mapping (node, slot, core).
- --bind-to _policy_
- Process binding.
- -x _var_
- Export environment variable.
FAQ
What is the mpirun command used for?
mpirun launches MPI parallel programs. Starts multiple processes across nodes for distributed computing. Part of OpenMPI or MPICH implementations.
How do I run a basic mpirun example?
Run `mpirun -np [4] [program]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -np _n_ do in mpirun?
Number of processes.