首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >OpenMPI:尝试使用mpirun时被拒绝的权限错误

OpenMPI:尝试使用mpirun时被拒绝的权限错误
EN

Stack Overflow用户
提问于 2016-03-05 20:33:22
回答 1查看 4.3K关注 0票数 3

我想在以下代码的帮助下,通过MPI在不同的Google云计算实例上显示"hello world“:

代码语言:javascript
复制
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连接,而不会遇到任何问题,当我试图运行我的脚本时,我会得到一条拒绝权限的错误消息。我使用以下命令来启用我的脚本:

mpirun -宿主本地主机,instance_1,instance_2 python hello_world.py

并获得以下错误消息:

代码语言:javascript
复制
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-标准-1
  • 实例-OS: Linux (默认)

感谢你的帮助:-)

新信息:

(谢谢@ Zulan指出我应该编辑上一篇文章,而不是为新信息创建一个新的答案)

所以,我试着用mpich来代替openmpi。但是,我遇到了类似的错误消息。

命令:

mpirun -宿主本地主机,instance_1,instance_2 python hello_world.py

错误消息:

代码语言:javascript
复制
Host key verification failed.

我可以在两个实例之间进行ssh连接,没有问题,并且通过gcloud命令,ssh-键应该自动正确地设置。

有人知道问题出在哪里了吗?我还检查了路径、防火墙规则以及在临时文件夹中编写启动脚本的能力。有人能尝试重现这个问题吗?+我应该向谷歌提出这个问题吗?(我以前从未做过这样的事,我很不确定。)

感谢您的帮助:)

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2016-03-17 13:23:32

所以我终于找到了解决办法。哇问题快把我逼疯了。

因此,我需要手动生成ssh键,这样脚本才能工作。我不知道为什么,因为google服务已经通过使用gcloud compute ssh设置了密钥,但是它成功了:)

我采取了以下步骤:

代码语言:javascript
复制
instance_1 $ ssh-keygen -t rsa
instance_1 $ cd .ssh
instance_1 $ cat id_rsa.pub >> authorized_keys
instance_1 $ gcloud compute copy-files id_rsa.pub 
instance_1 $ gcloud compute ssh instance_2

instance_2 $ cd .ssh
instance_2 $ cat id_rsa.pub >> authorized_keys

我将打开另一个主题,并问为什么我不能使用ssh instance_2,即使gcloud compute ssh instance_2正在工作。请参阅:Difference between the commands "gcloud compute ssh" and "ssh"

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35819556

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档