As per my little knowledge mpirun and mpiexec both are launcher. Can anybody tell the exact difference between mpiexec and mpirun?
2 回答
mpiexec is defined in the MPI standard (well, the recent versions at least) and I refer you to those (your favourite search engine will find them for you) for details.
mpirun is a command implemented by many MPI implementations. It has never, however, been standardised and there have always been, often subtle, differences between implementations. For details see the documentation of the implementation(s) of your choice.
And yes, they are both used to launch MPI programs, these days mpiexec is generally preferable because it is standardised.
我知道这个问题已经得到解答,但我认为答案不是最好的。我在这里使用 mpirun 在集群上遇到了一些问题,并查看了 mpirun 和 mpiexec 之间是否存在差异。这是我发现的:
描述
Mpiexec 是脚本 mpirun 的替代程序,它是 mpich 包的一部分。它用于在 PBS 批处理或交互式环境中初始化并行作业。Mpiexec 使用 PBS 的任务管理器库在 PBS 分配的节点上生成可执行文件的副本。
使用 mpiexec 而不是脚本 (mpirun) 或外部守护程序 (mpd) 的原因:
- 使用 TM 接口启动任务比为每个进程调用单独的 rsh 或 ssh 快得多。
- 生成的进程使用的资源通过 mpiexec 正确计算,并在 PBS 日志中报告,因为并行作业的所有进程都在 PBS 的控制之下,这与使用启动脚本(如 mpirun)时不同。
- 超过分配的 CPU 时间、挂钟时间、内存使用或磁盘空间限制的任务将被 PBS 彻底终止。使用 mpiexec 时,进程很难摆脱对资源管理器的控制。
- 您可以使用 mpiexec 来强制执行安全策略。如果所有作业都需要使用 mpiexec 和 PBS 执行环境启动,则无需启用对集群中计算节点的 rsh 或 ssh 访问。