【发布时间】:2016-03-05 20:33:22
【问题描述】:
我想借助以下代码在不同的 Google 云计算实例上通过 MPI 显示“hello world”:
from mpi4py import MPI
size = MPI.COMM_WORLD.Get_size()
rank = MPI.COMM_WORLD.Get_rank()
name = MPI.Get_processor_name()
print("Hello, World! I am process/rank {} of {} on {}.\n".format(rank, size, name))
.
问题是,即使我可以毫无问题地跨所有这些实例进行 ssh-connect,但当我尝试运行我的脚本时,我会收到一条权限被拒绝的错误消息。我使用以下命令来调用我的脚本:
mpirun --host localhost,instance_1,instance_2 python hello_world.py
.
并得到以下错误信息:
Permission denied (publickey).
--------------------------------------------------------------------------
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).
--------------------------------------------------------------------------
.
附加信息:
- 我在所有节点上都安装了 open-MPI
- 我让 Google 通过使用 gcloud 从每个实例登录到每个实例来自动设置我的所有 ssh 密钥
- 实例类型:n1-standard-1
- instance-OS:Linux Debian(默认)
.
感谢您的帮助 :-)
.
新信息:
(感谢@Zulan 指出我应该编辑我以前的帖子,而不是为新信息创建新答案)
所以,我尝试用 mpich 而不是 openmpi 来做同样的事情。但是,我遇到了类似的错误消息。
命令:
mpirun --host localhost,instance_1,instance_2 python hello_world.py
.
错误信息:
Host key verification failed.
.
我可以毫无问题地在我的两个实例之间进行 ssh-connect,并且通过 gcloud 命令,ssh-keys 应该会自动正确设置。
那么,有人知道问题可能是什么吗?我还检查了路径、防火墙规则以及我在临时文件夹中编写启动脚本的能力。有人可以尝试重现这个问题吗? + 我应该向 Google 提出这个问题吗? (以前从未做过这样的事情,我很不确定:S)
感谢您的帮助:)
【问题讨论】:
标签: python ssh mpi google-compute-engine permission-denied