17 January 2012

52. Network (hosts) setting for mpich2 /mpd on debian

I have a switch with three computers attached two it. The ip addresses are static and are (beryllium), (boron), (tantalum)

I use the computers to run nwchem across several nodes. The default /etc/chosts settings cause problems when trying to connect different instances of mpd on different nodes.


beryllium: /etc/hosts localhost  beryllium boron tantalum

Won't work, but localhost  beryllium boron tantalum


See for example:

Using /etc/hosts: localhost  beryllium boron tantalum

me@tantalum:~$ mpdtrace -l
tantalum_51108 (

me@beryllium:~$ mpd --ncpus=6 -h -p 51108 &
[2] 26283

me@tantalum:~$ mpdtrace -l
tantalum_51108 (
beryllium_38569 (

See the ip address ( tantalum sees, which is it's localhost (i.e. also tantalum). It should point at beryllium (

Using /etc/hosts: localhost beryllium boron tantalum

me@tantalum:~$ mpdtrace -l
tantalum_58007 (

me@beryllium:~$ mpd --ncpus=6 -h -p 58007 &
[2] 26596

me@tantalum:~$ mpdtrace -l
tantalum_58007 (
beryllium_56234 (

And now it looks better.

"But /etc/hosts keeps changing on reboot!"
Which is because Network Manager keeps fiddling with it. Look at point 6 here http://verahill.blogspot.com/2012/01/debian-testing-64-wheezy-small-fixes.html

I haven't figured out how to do this via the command line yet.

No comments:

Post a Comment