【发布时间】:2013-02-10 22:14:39
【问题描述】:
我浏览了很多示例,但我仍然感到困惑。我从here 编译了一个简单的延迟检查程序,它可以在一台主机上完美运行,但是当我尝试在两台主机上运行它时它会挂起。但是,运行类似hostname 的东西运行良好:
[hamiltont@4 latency]$ mpirun --report-bindings --hostfile hostfile --rankfile rankfile -np 2 hostname
[4:16622] [[5908,0],0] odls:default:fork binding child [[5908,1],0] to slot_list 0
4
[5:12661] [[5908,0],1] odls:default:fork binding child [[5908,1],1] to slot_list 0
5
但这里是编译好的延迟程序:
[hamiltont@4 latency]$ mpirun --report-bindings --hostfile hostfile --rankfile rankfile -np 2 latency
[4:16543] [[5989,0],0] odls:default:fork binding child [[5989,1],0] to slot_list 0
[5:12582] [[5989,0],1] odls:default:fork binding child [[5989,1],1] to slot_list 0
[4][[5989,1],0][btl_tcp_endpoint.c:638:mca_btl_tcp_endpoint_complete_connect] connect() to 10.0.2.5 failed: Connection timed out (110)
我目前的猜测是我的防火墙规则有问题(例如主机名不在主机之间通信,但延迟程序可以)。
[hamiltont@4 latency]$ cat rankfile
rank 0=10.0.2.4 slot=0
rank 1=10.0.2.5 slot=0
[hamiltont@4 latency]$ cat hostfile
10.0.2.4 slots=2
10.0.2.5 slots=2
【问题讨论】:
-
那是
tcpBTL 组件试图在节点4和节点5之间建立连接以开始发送消息并失败。您的分析是正确的 -hostname不进行 MPI 通信,这就是它工作正常的原因。只需指示您的防火墙都接受来自其他主机的连接。 -
Hristo - 如果您愿意回复我很乐意接受!关闭局域网内的 IPTables 工作正常!
-
你去吧 - 对您的特定问题的回答和一些额外的信息,对于遇到相同问题但出于不同原因的其他人可能会派上用场。
标签: cluster-computing mpi