多台计算机上的MPICH2(HYDU_sock_connect错误) [英] MPICH2 on multiple machines (HYDU_sock_connect error)
本文介绍了多台计算机上的MPICH2(HYDU_sock_connect错误)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在2台不同的PC中执行MPI程序.但是,当我在pc1中运行以下命令时:
I am trying to execute an MPI program in 2 different PCs. However, when I ran this command in pc1:
mpirun -hosts user@host -n 4 bin/Demo_01.exe
我收到此错误:
[proxy:0:0@pc2] HYDU_sock_connect (./utils/sock/sock.c:203): unable to connect from "pc2" to "pc1" (Connection refused)
[proxy:0:0@pc2] main (./pm/pmiserv/pmip.c:209): unable to connect to server ubuntu at port 57395 (check for firewalls!)
尽管我将SSH连接配置为没有密码,并且在每台计算机上都禁用了防火墙,但错误仍然存在.我的操作系统是Ubuntu 12.04,MPI是MPICH2.
Although I configured SSH connections as without password and disabled firewalls on each machines, the error is still there. My operating system is Ubuntu 12.04 and mpi is MPICH2.
有没有人可以帮忙?
推荐答案
已修复.在按照以下步骤操作后,错误消失了:
Fixed. After I followed these steps, the error disappeared:
- 在两台计算机上使用相同的用户名和密码创建管理员用户帐户.
- 通过编辑文件来定义主机名:/etc/hosts
- 在两台计算机上全新安装ssh.
- 配置ssh以在没有密码的情况下进行连接.为此,请点击以下链接: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/和 http://dustymabe.com/2012 /08/18/exchangeing-ssh-keys-using-ssh-copy-id/
- 将可执行的MPI程序放置在两台计算机的相同路径中.
- Create administrator user accounts in both machines with the same username and password.
- Define hostnames by editing the file: /etc/hosts
- Make a clean install of ssh in both machines.
- Configure ssh for connecting without a password. To do this follow these links: http://www.thegeekstuff.com/2008/11/3-steps-to-perform-ssh-login-without-password-using-ssh-keygen-ssh-copy-id/ and http://dustymabe.com/2012/08/18/exchanging-ssh-keys-using-ssh-copy-id/
- Locate the executable MPI program into the same paths in both machines.
这篇关于多台计算机上的MPICH2(HYDU_sock_connect错误)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文