我浏览了很多例子,但我仍然感到困惑。我从这里编译了一个简单的延迟检查程序,它可以在一台主机上完美运行,但是当我尝试在两台主机上运行它时它会挂起。但是,运行类似的东西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