MPI多节点执行:HYDU_sock_connect (utils/sock/sock.c:145): unable to connect from x to y (No route to host)

问题:

在多节点环境上运行MPI程序,出现错误:

HYDU_sock_connect (utils/sock/sock.c:145): unable to connect from "2" to "1" (No route to host)
main (pm/pmiserv/pmip.c:183): unable to connect to server digital4.ocean at port 42355 (check for firewalls!)
HYDU_sock_connect (utils/sock/sock.c:145): unable to connect from "3" to "1" (No route to host)
main (pm/pmiserv/pmip.c:183): unable to connect to server digital4.ocean at port 42355 (check for firewalls!)

解决:

1、关闭防火墙

关闭防火墙,即可运行成功

systemctl stop firewalld

2、修改hosts文件

可能是客户端连接不到服务器引起的,在客户端的host文件中添加相关的ip和主机名,如node2中:

10.10.1.12 node1
10.10.1.56 node3

3、防火墙添加富规则

在node1(服务端)的防火墙中添加富规则:

firewall-cmd --add-rich-rule='rule family="ipv4" source address="(node2的ip)" accept'
firewall-cmd --add-rich-rule='rule family="ipv4" source address="(node3的ip)" accept'

查看添加的富规则:

firewall-cmd --list-rich-rules

移除添加的富规则:

firewall-cmd --remove-rich-rule='rule family="ipv4" source address="(node2的ip)" accept'
firewall-cmd --remove-rich-rule='rule family="ipv4" source address="(node3的ip)" accept'

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值