【发布时间】:2019-05-29 08:20:45
【问题描述】:
TLDR:
我有 2 个google compute engine 实例,我在两个实例上都安装了mpich。
当我尝试运行示例时,我得到Host key verification failed。
详细版本:
我已按照本教程完成此任务:http://mpitutorial.com/tutorials/running-an-mpi-cluster-within-a-lan/。
我有 2 个带有 ubuntu 14.04 的 google compute engine vms(谷歌云帐户是试用版,顺便说一句)。我已经在两个实例上下载了这个版本的 mpich:http://www.mpich.org/static/downloads/3.3rc1
/mpich-3.3rc1.tar.gz,并使用以下步骤安装了它:
./configure --disable-fortran
sudo make
sudo make install
这是/etc/hosts 文件在master-node 上的样子:
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
169.254.169.254 metadata.google.internal metadata
10.128.0.3 client
10.128.0.2 master
10.128.0.2 linux1.us-central1-c.c.ultimate-triode-161918.internal linux
1 # Added by Google
169.254.169.254 metadata.google.internal # Added by Google
这就是/etc/hosts 文件在client-node 上的样子:
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
169.254.169.254 metadata.google.internal metadata
10.128.0.2 master
10.128.0.3 client
10.128.0.3 linux2.us-central1-c.c.ultimate-triode-161918.internal linux
2 # Added by Google
169.254.169.254 metadata.google.internal # Added by Google
其余步骤涉及在两个节点上添加一个名为 mpiuser 的用户,并在节点之间配置无密码 ssh 身份验证。并在节点之间配置cloud 共享目录。
到目前为止,配置一直有效。我已经把这个文件https://raw.githubusercontent.com/pmodels/mpich/master/examples/cpi.c下载到/home/mpiuser/cloud/mpi_sample.c,这样编译:
mpicc -o mpi_sample mpi_sample.c
并在以mpiuser 登录时在主节点上发出此命令:
mpirun -np 2 -hosts client,master ./mpi_sample
我得到了这个错误:
Host key verification failed.
怎么了?我已尝试解决此问题超过 2 天,但我无法获得有效的解决方案。
【问题讨论】:
-
此消息暗示无密码 SSH 确实不工作!假设您从
master主机上的mpiuser帐户调用mpirun,只需从那里调用ssh client,并接受或修复远程主机密钥。您可能必须在client主机上执行相同的操作。 -
@GillesGouaillardet 您将如何修复/接受远程主机上的密钥?
-
你试过
ssh client吗? -
@GillesGouaillardet 是的。我尝试手动重新生成密钥,但仍然出现该错误。
-
ssh client说什么?
标签: google-cloud-platform mpi google-compute-engine mpich