MPI跨节点运行:Fatal error in PMPI_Barrier: Unknown error class, error stack:

 问题:

在运行跨节点的MPI程序时,在没有使用同步函数(MPI_Barrier())时,程序可以正常运行,加入同步函数后,会出现下面的错误:

Fatal error in PMPI_Barrier: Unknown error class, error stack:
PMPI_Barrier(289).....................: MPI_Barrier(comm=MPI_COMM_WORLD) failed
PMPI_Barrier(275).....................: 
MPIR_Barrier_impl(175)................: 
MPIR_Barrier_intra_auto(110)..........: 
MPIR_Barrier_intra_smp(43)............: 
MPIR_Barrier_impl(175)................: 
MPIR_Barrier_intra_auto(110)..........: 
MPIR_Barrier_intra_dissemination(49)..: 
MPIDU_Complete_posted_with_error(1137): Process failed
MPIR_Barrier_intra_smp(59)............: 
MPIR_Bcast_impl(310)..................: 
MPIR_Bcast_intra_auto(223)............: 
MPIR_Bcast_intra_binomial(182)........: Failure during collective
Fatal error in PMPI_Barrier: Unknown error class, error stack:
PMPI_Barrier(289).............: MPI_Barrier(comm=MPI_COMM_WORLD) failed
PMPI_Barrier(275).............: 
MPIR_Barrier_impl(175)........: 
MPIR_Barrier_intra_auto(110)..: 
MPIR_Barrier_intra_smp(59)....: 
MPIR_Bcast_impl(310)..........: 
MPIR_Bcast_intra_auto(223)....: 
MPIR_Bcast_intra_binomial(182): Failure during collective
Fatal error in PMPI_Barrier: Unknown error class, error stack:
PMPI_Barrier(289).............: MPI_Barrier(comm=MPI_COMM_WORLD) failed
PMPI_Barrier(275).............: 
MPIR_Barrier_impl(175)........: 
MPIR_Barrier_intra_auto(110)..: 
MPIR_Barrier_intra_smp(59)....: 
MPIR_Bcast_impl(310)..........: 
MPIR_Bcast_intra_auto(223)....: 
MPIR_Bcast_intra_binomial(182): Failure during collective

解决:

1、使用的节点运行说明文件为:

node1:3
node2:3
node3:3

2、将运行说明文件的节点名,修改为IP地址时,程序正常运行

10.10.1.12:3
10.10.1.56:3
10.10.1.23:3

3、那么应该是host文件出现了问题:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 node1
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.1.12:node1
10.10.1.56:node2
10.10.1.23:node3

4、在host文件中,127.0.0.1 后面添加了node1,那么其他节点尝试连接node1时可能会连接到本地主机。将node1删除,其他节点出现类似情况也要进行修改,程序即可正常运行。

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.10.1.12:node1
10.10.1.56:node2
10.10.1.23:node3

 

  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值