【问题标题】:OpenMPI -host and -hostfile optionsOpenMPI -host 和 -hostfile 选项
【发布时间】:2017-07-31 06:19:44
【问题描述】:

使用 OpenMPI v2,当我使用 -host 运行测试程序时,它可以工作。我的意思是,该过程跨越到我指定的主机。但是,当我指定-hostfile时,它不起作用!!

mahmood@cluster:mpitest$ /share/apps/computer/openmpi-2.0.1/bin/mpirun -host compute-0-0,cluster -np 2 a.out
****************************************************************************
* hwloc 1.11.2 has encountered what looks like an error from the operating system.
*
* Package (P#1 cpuset 0xffff0000) intersects with NUMANode (P#1 cpuset 0xff00ffff) without inclusion!
* Error occurred in topology.c line 1048
*
* The following FAQ entry in the hwloc documentation may help:
*   What should I do when hwloc reports "operating system" warnings?
* Otherwise please report this error message to the hwloc user's mailing list,
* along with the output+tarball generated by the hwloc-gather-topology script.
****************************************************************************
Hello world from processor cluster.hpc.org, rank 1 out of 2 processors
Hello world from processor compute-0-0.local, rank 0 out of 2 processors
mahmood@cluster:mpitest$ cat hosts
cluster
compute-0-0

mahmood@cluster:mpitest$ /share/apps/computer/openmpi-2.0.1/bin/mpirun -hostfile hosts -np 2 a.out      
****************************************************************************
* hwloc 1.11.2 has encountered what looks like an error from the operating system.
*
* Package (P#1 cpuset 0xffff0000) intersects with NUMANode (P#1 cpuset 0xff00ffff) without inclusion!
* Error occurred in topology.c line 1048
*
* The following FAQ entry in the hwloc documentation may help:
*   What should I do when hwloc reports "operating system" warnings?
* Otherwise please report this error message to the hwloc user's mailing list,
* along with the output+tarball generated by the hwloc-gather-topology script.
****************************************************************************
Hello world from processor cluster.hpc.org, rank 0 out of 2 processors
Hello world from processor cluster.hpc.org, rank 1 out of 2 processors

那是什么问题,我该如何解决?

【问题讨论】:

  • 好的,谢谢。我记得我以前的 1.6 版本没有这样的问题。有什么理由吗?我怎样才能永久解决这个问题,以便在命令行上使用更少的选项。由于其他用户不是专家,只想运行 mpi 作业。

标签: openmpi


【解决方案1】:

-host 参数中列出的主机每个都提供一个插槽,因此 -host A,B 表示主机 A 上的一个插槽和主机 B 上的一个插槽。

要强制 mpiexec 为每个节点启动 N 个进程,请使用以下选项

--map-by ppr:N:node

在您的情况下,对于每个节点一个进程,它应该是--map-by ppr:1:node。或者,您可以通过将主机文件修改为如下所示将每个主机的插槽数限制为一个:

cluster     slots=1 max_slots=1
compute-0-0 slots=1 max_slots=1

(虽然slots=1 应该是默认值,如果没有提供...)

【讨论】:

  • 这不是-np吗?
  • -np 指定要启动多少进程,--map-by 指定如何将它们分配到可用槽中。如果您希望 MPI 程序使用主机文件中列出的节点提供的所有插槽,您可以完全跳过-np
猜你喜欢
  • 1970-01-01
  • 2019-04-01
  • 2011-07-05
  • 2015-03-28
  • 2016-06-21
  • 1970-01-01
  • 2018-12-21
  • 1970-01-01
  • 2019-01-31
相关资源
最近更新 更多