Newsgroups: comp.parallel.mpi
From: legal@cix.co.uk (Ian Cumbers)
Subject: Re: help linux - Mpich gethostbyname() failed 100 times for host darkstar
Organization: CIX
Date: 11 Dec 1996 00:17:13 GMT
Message-ID: <memo.961211001657.511A@stafford-systems.compulink.co.uk>

In article <32AC792C.1979@uninet.com.br>, afontes@uninet.com.br (Alberto) 
wrote:

> I'm a new user of LINUX (slackware 2.0.0) - Mpich, and the 
> install of Mpich I did over a Pentium (single workstation)
>   was this way:
> 	zcat mpich.tar|tar xvf -
>         cd mpich
> 	configure -arch=LINUX -device=ch_p4 -nof77
> 	make > make.log
> 
> 	I've done the compilation of a example (.../examples/basic/make 
> cpi). Until this point everything is OK. But when I do 
> 	mpirun -np 4 cpi,  I receive this message: 
> p0_1234 gethostbyname() failed 100 times for host darkstar
> 
> 	I have the file  /mpich/bin/machines/machines.LINUX (darkstar
> 							     darkstar...)
> 	Does anybody know what's the problem?
> 
> 	P.S. Sorry about my english, it's terrible...
> 
> 	Thank's in advance
> 
> 	[]'s,
> 	Alberto

Caveat - I know nothing about mpich (and don't ask why I'm in here!)

Slackware 2 (and possibly several other distributions of Linux) have a 
default hostname of 'darkstar.frop.org' that will be used if you don't 
have the file /etc/HOSTNAME setup.

'gethostbyname' is the UNIX call to find an IP Address by offering a 
'hostname',  in this case,  Darkstar.  It fails because there probably 
isn't an entry for darkstar in your '/etc/hosts' file (or DNS).

I think that your best bet is to configure networking on Linux,  even if 
you just have something called 'loopback' (ok,  even if you don't have a 
network card).

<Only continue if you have no networking installed:  If you have then this 
will disable external TCP/IP!!!>

Suggestion:
Run 'netconfig':  

enter a hostname, something silly like "fred" (but without the quote 
marks).

enter a domain name,  again,  this is not for connection to a real network 
so choose anything,  e.g. "company.com"

Answer YES to the question,  do you want loopback only.

Reboot and check the startup messages;  you should now have TCP/IP running 
"internally" within Linux,  a /etc/HOSTNAME file and a /etc/hosts file.  
'gethostbyname' should now work.

If you are still stuck,  feel free to e-mail me with details on your setup 
(stand alone / network) etc. and I'll run through things in more detail.

Oh,  and your English is just fine :-)


Regards


Ian Cumbers
legal@cix.co.uk
Ian@stafford-systems.cix.co.uk

