首页 > 解决方案 > MPID_nem_tcp_init(384).............: gethostbyname 失败,Mac (errno 1)

问题描述

我在我的 macbook 上本地安装了 mpich3.3,但是我得到了这个运行时错误:

MPI_Init 中的致命错误:其他 MPI 错误,错误堆栈:

MPIR_Init_thread(565).......

MPID_Init(224) .....................:通道初始化失败

MPIDI_CH3_Init(105).......

MPID_nem_init(324).......

MPID_nem_tcp_init(178).............:

MPID_nem_tcp_get_business_card(425):

MPID_nem_tcp_init(384).............: gethostbyname 失败,Mac (errno 1)

谁能帮我指出问题并告诉我如何解决?

标签: macosmpich

解决方案


通过在文件中添加新行已解决此问题/etc/hosts

1 ## 2 # Host Database 3 # 4 # localhost is used to configure the loopback interface 5 # when the system is booting. Do not change this entry. 6 ## 7 127.0.0.1| localhost 8 255.255.255.255|broadcasthost

只需添加一个新行127.0.0.1 Mac,您需要在其中替换Mac为您当前的机器名称。

我相信这个问题是由系统偏好中的机器名称修改引起的。


推荐阅读