wiki:jazz/mpdboot

Version 3 (modified by jazz, 16 years ago) (diff)

--

How to run R-MPI on multiple machine with normal user permission

Issue description

  • We found that if we run mpd with superuser privilege (i.e. root permission), normal user in each node can not connect to mpd to run R-MPI.
    • First, we had finished the ip and hostname mapping by modifying /etc/hosts, and then use scp to exchange ssh public key to each compute node.
      bio-cluster-12:~# cat /etc/hosts
      X.X.X.12 bio-cluster-12
      X.X.X.11 bio-cluster-11
      X.X.X.10 bio-cluster-10
      X.X.X.9  bio-cluster-09
      X.X.X.8  bio-cluster-08
      X.X.X.7  bio-cluster-07
      X.X.X.6  bio-cluster-06
      
      bio-cluster-12:~# for i in 11 10 09 08 07 06; do scp .ssh/id_rsa.pub bio-cluster-$i:.ssh/authorized_keys; done
      
    • We had created the same mpd.conf in each node
      bio-cluster-12:~# cat > /etc/mpd.conf << "EOF"
      > secretword=this_is_password
      > EOF
      
      bio-cluster-12:~# for i in 11 10 09 08 07 06; do scp /etc/mpd.conf bio-cluster-$i:/etc/.; done
      
    • The mpd.hosts file is as following:
      bio-cluster-12:~# cat mpd.hosts
      bio-cluster-11
      bio-cluster-10
      bio-cluster-09
      bio-cluster-08
      bio-cluster-07
      bio-cluster-06
      
    • run mpdboot with superuser privilege
  • Reference Solution: Getting started with AMBER

Configure mpd for normal user

  • Fisrt, login as nornal user. Here we login with user id 'jazz'. Then exchange SSH public key to each computing node.
    login as: jazz
    jazz@bio-cluster-12's password:
    jazz@bio-cluster-12:~$ for i in 11 10 09 08 07 06; do scp .ssh/id_rsa.pub bio-cluster-$i:.ssh/authorized_keys; done
    
  • setup .mpd.conf for each compute node in $HOME
    jazz@bio-cluster-12:~$ echo "MPD_SECRETWORD=${user}$$" > ~/.mpd.conf
    jazz@bio-cluster-12:~$ chmod 600 .mpd.conf
    jazz@bio-cluster-12:~$ for i in 11 10 09 08 07 06
    > do
    > scp .mpd.conf bio-cluster-$i:.
    > done
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    .mpd.conf                                     100%   21     0.0KB/s   00:00
    
  • setup mpd.hosts on localhost
    jazz@bio-cluster-12:~$ cat > mpd.hosts << EOF
    > bio-cluster-11
    > bio-cluster-10
    > bio-cluster-09
    > bio-cluster-08
    > bio-cluster-07
    > bio-cluster-06
    > EOF
    
  • run mpdboot for 7 nodes and use mpdtrace to check the status of mpd process on each compute node. mpdringtest can test the speed of message passing.
    jazz@bio-cluster-12:~$ mpdboot -n 7
    jazz@bio-cluster-12:~$ mpdtrace -l
    bio-cluster-12_54092 (140.129.162.12)
    bio-cluster-08_38361 (10.220.202.223)
    bio-cluster-09_52923 (10.220.202.222)
    bio-cluster-11_33377 (10.220.202.220)
    bio-cluster-10_33103 (10.220.202.221)
    bio-cluster-06_59631 (10.220.202.225)
    bio-cluster-07_59533 (10.220.202.224)
    jazz@bio-cluster-12:~$ mpdringtest 100
    time for 100 loops = 0.0729811191559 seconds