<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hi, <div><br></div><div>I have also tried the following, with similar result:</div><div><br></div><div><br></div><div><div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(252, 134, 0); background-color: rgb(0, 0, 0);">$ mpiexec -n 1 -host localhost ./hello</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(252, 134, 0); background-color: rgb(0, 0, 0);">[mpiexec@mac] HYDU_sock_is_local (utils/sock/sock.c:532): gethostbyname error on mac: Unknown host</div><div style="margin: 0px; font-size: 13px; font-family: Menlo; color: rgb(252, 134, 0); background-color: rgb(0, 0, 0);">[mpiexec@mac] main (ui/mpich/mpiexec.c:291): unable to check if localhost is local</div><div><br></div><div apple-content-edited="true">
<div> thought it could add some more info.</div><div><br></div><div>Cheers,</div><div>Luis</div><div><br></div><br class="Apple-interchange-newline">
</div>
<br><div><div>On 28 Feb 2014, at 12:25, Luis Cebamanos <<a href="mailto:l.cebamanos@epcc.ed.ac.uk">l.cebamanos@epcc.ed.ac.uk</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<br><br>I have installed MPICH2 in a Mac 10.9.2 using homebrew. The installation process went OK, no problems were reported. Then I created a small hello world example just to test the MPI:<br><br>#include <stdio.h><br>#include "mpi.h"<br><br>int main (argc, argv)<br> int argc;<br> char *argv[];<br>{<br> int rank, size;<br><br> MPI_Init (&argc, &argv);/* starts MPI */<br> MPI_Comm_rank (MPI_COMM_WORLD, &rank);/* get current process id */<br> MPI_Comm_size (MPI_COMM_WORLD, &size);/* get number of processes */<br><br> printf( "Hello world from process %d of %d\n", rank, size );<br><br> MPI_Finalize();<br> return 0;<br>}<br><br>compile it ($mpicc -o hello hello.c), all went fine too; and finally run it ($mpiexec -n 2 ./hello). However, that is the problem reported by mpiexec:<br><br>$ mpiexec -n 2 ./hello<br>Fatal error in MPI_Init: Other MPI error, error stack:<br>MPIR_Init_thread(467)..............: <br>MPID_Init(177).....................: channel initialization failed<br>MPIDI_CH3_Init(70).................: <br>MPID_nem_init(319).................: <br>MPID_nem_tcp_init(171).............: <br>MPID_nem_tcp_get_business_card(418): <br>MPID_nem_tcp_init(377).............: gethostbyname failed, mac (errno 1)<br>Fatal error in MPI_Init: Other MPI error, error stack:<br>MPIR_Init_thread(467)..............: <br>MPID_Init(177).....................: channel initialization failed<br>MPIDI_CH3_Init(70).................: <br>MPID_nem_init(319).................: <br>MPID_nem_tcp_init(171).............: <br>MPID_nem_tcp_get_business_card(418): <br>MPID_nem_tcp_init(377).............: gethostbyname failed, mac (errno 1)<br><br>===================================================================================<br>= BAD TERMINATION OF ONE OF YOUR APPLICATION PROCESSES<br>= PID 653 RUNNING AT mac<br>= EXIT CODE: 1<br>= CLEANING UP REMAINING PROCESSES<br>= YOU CAN IGNORE THE BELOW CLEANUP MESSAGES<br>===================================================================================<br><br>The version installed:<br>$ mpichversion <br>MPICH Version: <span class="Apple-tab-span" style="white-space:pre"> </span>3.1<br>MPICH Release date:<span class="Apple-tab-span" style="white-space:pre"> </span>Thu Feb 20 11:41:13 CST 2014<br>MPICH Device: <span class="Apple-tab-span" style="white-space:pre"> </span>ch3:nemesis<br>MPICH configure: <span class="Apple-tab-span" style="white-space:pre"> </span>--disable-dependency-tracking --disable-silent-rules --prefix=/usr/local/Cellar/mpich2/3.1 --mandir=/usr/local/Cellar/mpich2/3.1/share/man<br>MPICH CC: <span class="Apple-tab-span" style="white-space:pre"> </span>clang -O2<br>MPICH CXX: <span class="Apple-tab-span" style="white-space:pre"> </span>clang++ <br>MPICH F77: <span class="Apple-tab-span" style="white-space:pre"> </span>/usr/local/bin/gfortran -O2<br>MPICH FC: <span class="Apple-tab-span" style="white-space:pre"> </span>/usr/local/bin/gfortran <br><br>Does anyone have any idea of why I am getting this error? The hostname command is also working fine, so I do NOT understand this problem. Furthermore, the idea is to run MPICH2 on my mac, not in a cluster so it should be straightforward to pick the hostname. My /etc/hosts shows the following:<br>$ cat /etc/hosts<br>##<br># Host Database<br>#<br># localhost is used to configure the loopback interface<br># when the system is booting. Do not change this entry.<br>##<br>127.0.0.1<span class="Apple-tab-span" style="white-space:pre"> </span>localhost<br>255.255.255.255<span class="Apple-tab-span" style="white-space:pre"> </span>broadcasthost<br>::1 localhost <br>fe80::1%lo0<span class="Apple-tab-span" style="white-space:pre"> </span>localhost<br><br>Any ideas? Any help, suggestions or workarounds would be much appreciated.<br><br>Best regards,<br>LuisThe University of Edinburgh is a charitable body, registered in<br>Scotland, with registration number SC005336.<br>_______________________________________________<br>discuss mailing list <a href="mailto:discuss@mpich.org">discuss@mpich.org</a><br>To manage subscription options or unsubscribe:<br><a href="https://lists.mpich.org/mailman/listinfo/discuss">https://lists.mpich.org/mailman/listinfo/discuss</a></blockquote></div><br></div></body></html>