MPICH2 gethostbyname失败 [英] MPICH2 gethostbyname failed
问题描述
我不明白该错误消息.我试图做的是在将mpich2版本1.4或1.5安装到/opt/mpich2
之后,运行MPICH2应用程序(两个版本均因相同的错误而失败).我的MPI应用程序是使用1.3编译的,但是我可以在另一个工作站上使用mpi 1.4来运行它.我正在Ubuntu 12.04上对其进行测试.
I don't understand the error message. I am trying to do is to run a MPICH2 application after I installed mpich2 version 1.4 or 1.5 to /opt/mpich2
(both version failed with the same error). My MPI application was compiled with 1.3 but I am able to run it with mpi 1.4 on another workstation. I am testing it on Ubuntu 12.04.
Fatal error in PMPI_Init_thread: Other MPI error, error stack:
MPIR_Init_thread(467)..............:
MPID_Init(177).....................: channel initialization failed
MPIDI_CH3_Init(70).................:
MPID_nem_init(319).................:
MPID_nem_tcp_init(171).............:
MPID_nem_tcp_get_business_card(418):
MPID_nem_tcp_init(377).............: gethostbyname failed, localhost (errno 3)
推荐答案
macOS解决方案
我在macOS 10.12.1上偶然发现了这个问题.
Solution for macOS
I stumbled upon this issue on macOS 10.12.1.
解决方案是将127.0.0.1 computername.local
添加到/etc/hosts
.您的文件或多或少看起来像这样:
The solution is to add 127.0.0.1 computername.local
to /etc/hosts
. Your file will look more or less like this:
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
127.0.0.1 computername.local
255.255.255.255 broadcasthost
::1 localhost
如果您转到系统偏好设置> 共享> 计算机名称,则可以更改/检查计算机的名称.
You can change/check your computer's name if you go to System Preferences > Sharing > Computer Name.
这篇关于MPICH2 gethostbyname失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!