【问题标题】:openmpi python more than 3 prcocessesopenmpi python超过3个进程
【发布时间】:2017-03-12 21:30:11
【问题描述】:

我运行了一个包含 3 个以上进程的简单 mpi python 程序。 例如:

mpiexec -host master,w1,w2,w3 python code.py

显示有一些错误

ssh: Could not resolve hostname w3: Name or service not known
ORTE was unable to reliably start one or more daemons.

This usually is caused by:

* not finding the required libraries and/or binaries on
  one or more nodes. Please check your PATH and LD_LIBRARY_PATH
  settings, or configure OMPI with --enable-orterun-prefix-by-default

* lack of authority to execute on one or more specified nodes.
  Please verify your allocation and authorities.

* the inability to write startup files into /tmp (--tmpdir/orte_tmpdir_base).
  Please check with your sys admin to determine the correct location to use.

*  compilation of the orted with dynamic libraries when static are required
  (e.g., on Cray). Please check your configure cmd line and consider using
  one of the contrib/platform definitions for your system type.

* an inability to create a connection back to mpirun due to a
  lack of common network interfaces and/or no route found between
  them. Please check network connectivity (including firewalls
  and network routing requirements).

但是,如果我使用 w1、w2、w3 中的任意两个运行程序,它就可以工作。 例如:

mpiexec -host master,w1,w3 python code.py

而且,这是代码

 import random
 import numpy as np
 from mpi4py import MPI

 comm = MPI.COMM_WORLD
 rank = comm.rank
 size = comm.size

 if rank ==0:
 print rank, 'worker'
 else:
 print rank, 'worker'

我该如何解决?谢谢。

【问题讨论】:

    标签: linux networking ssh python


    【解决方案1】:

    根据输出:ssh: Could not resolve hostname w3: Name or service not known,问题很清楚:

    您的主节点(机器)无法识别主机名w3。 您可以将name-ip 映射添加到/etc/hosts,格式为ip name。 例如: 255.255.255.0 the_name

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-05-18
      • 1970-01-01
      • 2022-01-01
      • 2021-05-22
      • 1970-01-01
      • 1970-01-01
      • 2017-04-10
      相关资源
      最近更新 更多