[mpich-discuss] On gethostbyname() and related issues on Macs
Pavan Balaji
balaji at mcs.anl.gov
Tue Mar 1 00:53:02 CST 2011
Thanks for the detailed analysis Nicolas. Some comments inline.
On 02/28/2011 09:35 PM, Nicolas Rosner wrote:
> In hydra/utils/sock/sock.c, if gethostbyname() yields NULL, errno is
> checked. However, according to both BSD and Darwin manpages*, such
> code should be checking h_errno. This was recently addressed (r8059),
> but it looks like only the first appearance (out of two in sock.c; see
> l.169 vs l.515) was fixed, wasn't it?
Good catch. Fixed in r8078 in trunk. I'll push it to the 1.3.x branch soon.
> a) it suffices to feed Hydra an invalid target hostname (via -f or
> -hosts, but also via env var, right?) to reproduce the exact same
> errors**,
>
> [mpiexec at fiona] HYDU_sock_is_local (./utils/sock/sock.c:515):
> unable to get host address (No such file or directory)
> [mpiexec at fiona] main (./ui/mpich/mpiexec.c:344):
> unable to check if fiona is local
I'm surprised with the error message above. Hydra should be hardcoding
the hostname as "localhost" in this case (see ui/mpich/mpiexec.c:277).
I'm not sure where the "fiona" hostname is coming from.
I added some more debug messages to Hydra. Can you download the latest
nightly snapshot and try out the following command:
$ mpiexec -verbose -n 2 -hosts foobar ./a.out
(assuming that you don't actually have a real host called "foobar").
http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/nightly/hydra
> It would explain the whole thing if Alex had somehow induced the name
> `lelos' as Hydra's pick. Otherwise the mystery would, I guess, boil
> down to why and how Hydra could, given no user hint, come up on its
> own with a name like `lelos', well-known by the GUI layer but
> unresolvable by plain old BSD methods.
That's still the mystery, but I think the above error message is coming
from the same issue.
-- Pavan
--
Pavan Balaji
http://www.mcs.anl.gov/~balaji
More information about the mpich-discuss
mailing list