MPICH2 gethostbyname failed

后端 未结 5 703
余生分开走
余生分开走 2021-01-31 09:57

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 fai

5条回答
  •  梦毁少年i
    2021-01-31 10:22

    What worked for me was the following:

    Make sure your hostname is the same for 1 and 2 below:

    1. terminal hostname
    2. "/etc/hosts" hostname

    So if you type cat /etc/hosts in terminal it should look like:

    // 127.0.0.1       my_hostname
    

    My hostname was not the same for 1 and 2 for me. Once I changed them to match then my mpi program would execute.

    To change your terminal hostname type the following: sudo scutil --set HostName my_new_host_name

    To change your /etc/hosts hostname type the following: sudo nano /etc/hosts

    and then add the line

    127.0.0.1       my_new_hostname
    

提交回复
热议问题