[mpich-discuss] unable to get host address

Nicolas Rosner nrosner at gmail.com
Wed Feb 23 20:50:49 CST 2011


Hi Alex,

As we confirmed, our systems are nearly identical, same OS version,
same untouched /etc/hosts, etc, the main one difference being your
direct Internet connection with a public address vs. my NAT routed,
behind-firewall private IP address at the lab where I work.

So tonight I took the Macbook home with me and retried the whole
process from scratch, but this time while being directly connected
like you are. Everything worked fine. I'm enclosing a description of
the steps performed so you can mimic them and confirm whether this
procedure works for you:


1) Ensured a working, direct connection w/public IP address

  - Reset link to ISP and rebooted Macbook to clear any caches.
  - Connected Macbook directly to the ISP-supplied cablemodem.
  - After a few moments, got a working IP address:  190.16.161.201.


2) Ensured a working, valid, correctly set public hostname

    $ host 190.16.161.201
    201.161.16.190.in-addr.arpa domain name pointer
201-161-16-190.fibertel.com.ar.

    $ host 201-161-16-190.fibertel.com.ar
    201-161-16-190.fibertel.com.ar has address 190.16.161.201

    $ sudo scutil --set HostName 201-161-16-190.fibertel.com.ar

      [Here I closed Terminal and opened a fresh new shell window.]

    $ hostname
    201-161-16-190.fibertel.com.ar


3) Downloaded, configured, built and installed fresh copy of MPICH2

    $ mkdir /mpich ; cd /mpich
    $ curl -O "http://www.mcs.anl.gov/research/projects/mpich2/downloads/tarballs/1.3.2p1/mpich2-1.3.2p1.tar.gz"
    $ tar -zxf mpich2-1.3.2p1.tar.gz
    $ cd mpich2-1.3.2p1
    $ ./configure --prefix=/mpich --disable-f77 --disable-fc
    $ make
    $ make install


4) Tried compiling and running an example program

    $ export PATH=/mpich/bin:$PATH
    $ cd examples
    $ mpicc cpi.c
    $ mpiexec -n 2 ./a.out
    Process 0 of 2 is on 201-161-16-190.fibertel.com.ar
    Process 1 of 2 is on 201-161-16-190.fibertel.com.ar
    pi is approximately 3.1415926544231318, Error is 0.0000000008333387
    wall clock time = 0.000196


Hope this works for you as well!

Good luck,
Nicolás


More information about the mpich-discuss mailing list