Ge Yan
Ge Yan

Reputation: 57

MPID_nem_tcp_init(384).............: gethostbyname failed, Mac (errno 1)

I install mpich3.3 locally on my macbook, but I got this run time error:

Fatal error in MPI_Init: Other MPI error, error stack:

MPIR_Init_thread(565)..............:

MPID_Init(224).....................: channel initialization failed

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 failed, Mac (errno 1)

Could anyone please help me point out the issue and tell me how to solve it?

Upvotes: 0

Views: 1106

Answers (1)

Ge Yan
Ge Yan

Reputation: 57

This problem has been solved by adding a new line in the file /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

Simply add a new line 127.0.0.1 Mac, where you need to replace Mac by your current machine name.

I believe this problem is caused by the modification of machine name from the system preference.

Upvotes: 1

Related Questions