无法在ubuntu 12.04的多台计算机上执行MPICH2(HYDU_sock_connect问题) [英] Unable to execute MPICH2 on multiple machines on ubuntu 12.04 (HYDU_sock_connect issue)
问题描述
我在两台机器上执行MPI程序时遇到困难.操作系统是Ubuntu 12.04. MPI实现是MPICH2
I am facing difficulty in executing MPI program on two machines. The OS is Ubuntu 12.04. And the MPI implementation is MPICH2
ssh运行正常:
root@ubuntu:/home# ssh 192.168.1.9
root@gpuguy's password:
Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.8.0-29-generic i686)
* Documentation: https://help.ubuntu.com/
131 packages can be updated.
67 updates are security updates.
Last login: Thu Oct 24 17:36:25 2013 from ubuntu.local
root@gpuguy:~#
但是当我运行MPI程序时,它会失败:
But when I run my MPI programs it fails:
root@ubuntu:/home# mpiexec -f hosts.cfg -n 4 hello
root@192.168.1.9's password:
[proxy:0:0@gpuguy] HYDU_sock_connect (./utils/sock/sock.c:171): unable to get host address for ubuntu (1)
[proxy:0:0@gpuguy] main (./pm/pmiserv/pmip.c:209): unable to connect to server ubuntu at port 42104 (check for firewalls!)
我已经在两台计算机上都禁用了防火墙,这就是我可以成功执行ssh的原因.但是如何解决这个问题呢?
I have already disabled firewall on both machines that is the reason I can do ssh successfully. But how to solve this issue?
我的MPI代码在单台计算机上成功运行.
My MPI code runs successfully on single machine.
推荐答案
为使MPICH(或任何MPI实现)正常工作,您需要设置无密码SSH.我还应该提到,您真的不必以root用户身份登录即可完成此工作.通常始终以root用户身份登录是一个非常糟糕的主意.
For MPICH (or any MPI implementation) to work, you need to have passwordless SSH set up. I should also mention that you really shouldn't have to be logged in as root to make this work. It's generally a very bad idea to be logged in as root all of the time.
这篇关于无法在ubuntu 12.04的多台计算机上执行MPICH2(HYDU_sock_connect问题)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!