无法在ubuntu 12.04上的多台计算机上执行MPICH2(HYDU\U sock\U connect问题)

无法在ubuntu 12.04上的多台计算机上执行MPICH2(HYDU\U sock\U connect问题),mpi,mpich,Mpi,Mpich,我在两台机器上执行MPI程序时遇到困难。操作系统是Ubuntu 12.04。MPI实现是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 b

我在两台机器上执行MPI程序时遇到困难。操作系统是Ubuntu 12.04。MPI实现是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程序时,它会失败:

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的原因。但如何解决这个问题呢


我的MPI代码在单机上成功运行

要使MPICH(或任何MPI实现)工作,您需要设置无密码SSH。我还应该提到,你真的不应该以root用户身份登录来实现这一点。通常,始终以root用户身份登录是一个非常糟糕的主意。

我已经安装了无密码ssh,但当我运行mpirun命令时,会收到一条错误消息“[代理:0:0@gauss-mic0]HYDU_sock_connect(./utils/sock/sock.c:264):无法从“gauss-mic0”连接到“127.0.1.1”(连接被拒绝)[代理:0:0@gauss-mic0]main(./pm/pmiserv/pmip.c:396):无法连接到端口42947处的服务器127.0.1.1(检查防火墙!)“如果您还有其他问题,您需要单独发布,而不是试图通过注释完成所有操作。