mpirun
orterun
、mpirun
、mpiexec
命令会在Open MPI执行串行和并行的job;oshrun
、shmemrun
命令会在Open SHMEM执行串行和并行的job。
SPMD:单个进程多个数据模型
mpirun [options] <program> [<args>]
MIMD:多命令多数据模型
mpirun [global_options] [local_options1] <program1> [<args1>]:[local_options2] <program2] [<args2>]:...:
[local_optionsN] <programN> [<argsN>]
在启动命令时可以使用全路径
% /usr/local/bin/mpirun ...
等同于
% mpirun --prefix /usr/local
如果仅是运行MPI应用,可以
% mpirun [ -np X ] [ --hostfile <filename> ] <program>
X表示在现在的运行环境中,运行的<program>
的副本数量
参数 | 说明 |
---|---|
<program> | 可执行程序 |
<args> | 传递给process的run-time参数,通常是mpirun的最后参数 |
-h,--help | 显示命令的帮助 |
-q,--quiet | 不显示程序执行的信息 |
-v,--verbose | |
-V,--version | 版本 |
-N <num> | 每个节点上运行的进程,同义于npernode |
-display-allocation,--display-allocation | 展示检测的资源分配 |
-output-proctable,--output-proctable | 输出debugger |
-dvm,--dvm | 创建分布式虚拟机(DVM) |
--max-vm-size,--max-vm-size <size> | 运行进程的数量 |
-novm,--novm | |
-hnp,--hnp <arg0> | |
-H,-host,--host <host1,host2,...,hostN> | 运行进程的主机列表 |
-hostfile, --hostfile <hostfile> | 提供hostfile |
-default-hostfile,--default-hostfile <hostfile> | 提供默认的hostfile |
-machinefile, --machinefile <machinefile> | 同义-hostfile |
-cpu-set, --cpu-set <list> | |
-c,-n,--n,-np <#> | 在给定的节点运行程序的副本数 |
-npersocket,--npersocket <#persocket> | |
-npernode,--npernode <#pernode> | |
-pernode,--pernode |