LAM MPI installation guide: 0.0. To start lam mpi: lamboot -d 0.1. To start xmpi: xmpi 0.2. To clean all lam mpi: lamclean -v (use lamclean to clean the current MPI program before proceeding to the next one. use lamhalt at the end of a lam session to stop lam mpi) 0.3. To shut down lam mpi: lamhalt -v to use the LAM MPI, type 'mpicc' and the file to be compiled. To capture the output of the configure ./configure {options} |& tee config.LOG ----------------------------------------------------------------------------------- (1) LAM MPI INSTALLATION ON THE SERVER SIDE (WHERE YOU WILL BE BOOTING THE LAM MPI) ----------------------------------------------------------------------------------- (A) Installing LAM MPI through CVS: 0. you must have autoconf-2.53, automake-1.6.2 and libtool-1.4.2 installed before proceeding, if you don't have them, then follow the instructions in (A.1) 1. cd /home/satya/software/lamMPI 2. export CVSROOT=":pserver:anonymous@cvs.lam-mpi.org:/l/lam" 3. cvs login 4. enter at password request 5. cvs -z3 checkout -P trillium (the cvs repository will be created in the directory trillium, you can use other name if you want to) 6. cvs update -P (-P trims defunct directories) 7. cd trillium 8. ./autogen.sh 9. follow the instructions in (C) (A.1.1) Installing autoconf-2.53 1. download autoconf-2.53 to /home/satya/software/autoconf directory 2. cd /home/satya/software/autoconf 3. bunzip autoconf-2.53.tar.bz2 4. tar -xvf autoconf-2.53.tar 5. ./configure --prefix=/usr 6. make 7. su 8. make install (A.1.2) Installing automake-1.6.2 1. download automake-1.6.2 to /home/satya/software/automake directory 2. cd /home/satya/software/automake 3. bunzip automake-1.6.2.tar.bz2 4. tar -xvf automake-1.6.2.tar 5. ./configure --prefix=/usr 6. make 7. su 8. make install (A.1.3) Installing libtool-1.4.2 1. download libtool-1.4.2 to /home/satya/software/libtool directory 2. cd /home/satya/software/libtool 3. bunzip libtool-1.4.2.tar.bz2 4. tar -xvf libtool-1.4.2.tar 5. ./configure --prefix=/usr 6. make 7. su 8. make install (B) Installing LAM MPI through tarball 1. gunzip -c lam-6.6b1.tar.gz | tar xvf - or bunzip2 lam-6.6b1.tar.bz2 | tar -xvf lam-6.6b1.tar at /home/satya/software/lamMPI 2. cd lam-6.6b1 3. check if gcc3, g++3, g77-3 and rsh (remote shell) exists. http://www.linuxdoc.org/HOWTO/VMS-to-Linux-HOWTO-5.html 4. check if rsh exists, if it doesnt then check if ssh exists. If ssh exists then use the option --with-rsh="ssh -x" in ./configure. If both dont exist then install rsh. 5. lam executables are found under $prefix/bin. so check that - there is a directory called /usr/local/bin - when you type an executable in that directory, it runs without specifying its path. 6. follow the instructions in (C) (C) Common LAM MPI Installation 1. lamclean (if it exists then make sure you uninstall the LAM MPI first) 2. ./configure --prefix=/usr --with-fflags="-I/usr/include -O" --with-trillium --with-rsh="ssh -x" --with-cxx=g++ --with-cc=gcc --with-fc=g77 3. make (don't use make -j 2, gives error) 4. su 5. enter root password 6. make install 7. exit 8. make examples 9. su 10. enter root password 11. gvim /usr/etc/lam-bhost.def 12. replace localhost with (each line represents a cpu): 161.139.67.77 161.139.67.77 13. exit 14. lamboot -d (to startup lam) 15. cd /home/satya/software/lamMPI/lam-6.5.6/examples/ring 16. ./ring (if it works then installation has been successful) 17. lamhalt -v (to shutdown lam) (D) Lam Test Suite Installation and Testing it thoroughly! (Must do this!!) (D.1) For downloaded tarball: 1. download lamtests-6.6b1.tar.bz2 from http://www.lam-mpi.org/beta/ into /home/satya/software/lamMPI 2. bunzip2 lamtests*.bz2 3. tar -xvf lamtests*.tar 4. cd lamtests-6.6b1 5. follow the instructions in D.3 (D.2) For downloaded CVS: 1. cd /home/satya/software/trillium/lamtests 2. ./autogen.sh 3. follow the instructions in D.3 (D.3) Common Test Suite Installation 1. ./configure 2. make 3. lamboot -d 4. make -k check (it seems that all passed except for /home/satya/software/trillium/lamtests/lam/dynamic/./mpil_spawn this is because only that test requires at least 3 processes to run, that means it is alright if this test fails when you run it on only 2 processors) 5. to test individual directories, go to the required directory and type: make -k check 6. lamhalt -v (E) XMPI installation guide (must have already installed LAM MPI before can proceed with this one): For XMPI to build, you must: have a working C++ compiler installed configure LAM/MPI with the "--with-trillium" switch to ./configure have LessTif or Motif installed Note: XMPI is only supported with LessTif 0.92.26. It may work with older versions, but has not been tested with anything older than 0.92.26. 1. tar -xvzf xmpi-2.2.3b6.tar.gz 2. cd xmpi-2.2.3b6.tar.gz 3. ./configure --prefix=/usr (problem if you use the following options --with-cxx=g++3 --with-cc=gcc3) 4. make 5. make install 6. type 'xmpi' to run xmpi 7. click on 'Application' & 'Build & Run' to view the number of cpus (F) To Reinstall 1. cd /home/satya/software/lamMPI/trillium 2. su 3. enter root password 4. make uninstall 5. make distclean 6. follow the instructions in (C) -------------------------------------------------------------------- (2) LAM MPI INSTALLATION ON THE CLIENT SIDE (THE CLIENT/SLAVE NODES) -------------------------------------------------------------------- 1. Install LAM/MPI just like on the server side. To do this follow instructions A/B and C. 2. You need not install the test suite and xmpi 3. Record the IP address of the current client node by: $ su # /sbin/./ifconfig the IP address is the "inet addr" from eth0 4. You must have a user account (e.g. satya) in each one of the clients which is the same as in the server. This is to simplyfy things. (I) Setting up passwordless openssh (the secure shell). You need it to be passwordless because LAM/MPI will not boot if it was prompted for anything at all during the connection process. ssh is better than rsh because it is very secure compared to rsh. (I.1) Setting up the prerequisites (I.1.1) CAUTION: THIS IS TO BE DONE ON THE CLIENT SIDE. Setting up ssh daemon (sshd) 1. To check whether you have already installed sshd: $ startx start a console $ su # serviceconf in the list, check whether if there is ssh, if it's there then enable it (this is to start up the ssh daemon at linux boot time which enables ssh connection to this computer) 2. If sshd is not installed, download openssh-server-2.9p2-7.i386.rpm or any other newer version into $HOME/software/openssh. Make sure the ssh server version is the same as the ssh's. You can check by: $ ssh -V then install the ssh server $ cd /home/satya/software/openssh $ su # rpm -U openssh-server-2.9p2-7.i386.rpm 3. After installing, in X Windows, recheck by $ su # serviceconf and see if sshd is listed. If it is, then the installation has been successful. Enable the sshd. If sshd is not setup and enabled, the ssh connection to the client computer will be refused. (I.1.2) CAUTION: THIS IS TO BE DONE ON THE CLIENT SIDE. Configuring the firewall (assumption: serverIP=172.16.2.93 clientIP=172.16.2.96) 1. enable ipchains in serviceconf: client$ su client# serviceconf ipchains is a decent solution to control firewall. If it is not setup correctly the ssh connection to the client computer will be refused. For your reference, besides ipchains, the following daemons are also enabled in serviceconf (they may not necessarily contribute to ssh connection): anacron gpm netfs rawdevices apmd ipchains network sgi_farm atd iptables nfslock sshd autofs keytable portmap syslog crond kudzu random xinetd 2. in the client computer, make sure there is the following line in the /etc/sysconfig/ipchains file: -A input -s 0/0 -d 0/0 22 -p tcp -y -j ACCEPT the above line is to allow access to ssh connection which uses the port 22 restart the client computer 3. To check whether you can connect to the client with ssh: login in the server as the common user, that you have setup in the server and each clients issue the following command: server$ ssh 172.16.2.96 where 172.16.2.96 is the IP address of the tested client that you had recorded earlier. enter 'yes' if it asks whether to trust the 172.16.2.96 client. it will prompt you for password: server$ satya@172.16.2.96's password: after entering the password, you should be able to login securely into the remote client computer to logout: $ logout (I.2) CAUTION: THIS IS TO BE DONE ON THE SERVER SIDE (Instructions 1-4 done only once on the server). Setting up DSA public key authentication method for ssh. DSA is better than RSA because it is more secure. DSA is only available with ssh protocol version2. (assumption: serverIP=172.16.2.93 clientIP=172.16.2.96) 1. server$ ssh-keygen -t dsa save the generated key to the prompted default file and its location i.e. /home/satya/.ssh/id_dsa enter the passphrase at the next prompt and remember the passphrase (it will be used later by ssh-agent). eg. passphrase: satyanandavel 2. copy the $HOME/.ssh/id_dsa.pub file as $HOME/.ssh/auhthorised_keys and $HOME/.ssh/authorised_keys2 (for protocol version 2) server$ cd $HOME/.ssh server$ cp id_dsa.pub authorized_keys server$ cp id_dsa.pub authorized_keys2 3. set the home directory and the $HOME/.ssh directory of the client and the servers to mode 755: clientserver$ chmod 755 /home/satya clientserver$ chmod 755 /home/satya/.ssh 4. ensure the following files inside the $HOME/.ssh directory have the following permissions: -rw-r--r-- authorized_keys -rw-r--r-- authorized_keys2 -rw------- id_dsa -rw-r--r-- id_dsa.pub -rw-r--r-- known_hosts 5. FOR EACH CLIENT: copy all the files in the current server $HOME/.ssh directory to the client $HOME/.ssh directory server$ cd /home/satya/.ssh server$ scp * satya@172.16.2.96:/home/satya/.ssh enter the user satya password at prompt 6. FOR EACH CLIENT: to make sure that the DSA setup is working: server$ ssh 172.16.2.96 if it prompts for passphrase instead of password, it means the DSA setup is successful enter the passphrase and you will be able to login to the client's $HOME. Next go on with I.3 and I.4. If you have already done I.3 and I.4 and this is your second/consecutive client: if it doesn't prompt anything at this point, and automatically logs you in, you have successfully added this client to your keychain's passwordless ssh login. (I.3) CAUTION: THIS IS TO BE DONE ON THE SERVER SIDE (done only once on the server side). Setting up the ssh-agent to disable the passphrase prompt (assumption: serverIP=172.16.2.93 clientIP=172.16.2.96) 1. invoke the ssh-agent: server$ ssh-agent /bin/bash 2. load the cache with your private key using ssh-add: server$ ssh-add /home/satya/.ssh/id_dsa enter the passphrase when prompted now the agent communicates with the client and hands off your private key when you want to authenticate 3. to check whether it works: server$ ssh 172.16.2.96 now you should be able to login without any prompting at all from the client 4. although you have setup the ssh-agent successfully, whenever you close the console and start a new one, you will have to execute the entire instructions in I.3 again to disable passphrase prompt. To solve this you need to setup keychain. Follow the instructions in I.4 to setup keychain. (I.4) CAUTION: THIS IS TO BE DONE ON THE SERVER SIDE (done only once on the server side). Setting up the keychain to enable passphrase prompt once only i.e. during the first login after linux OS boot (assumption: serverIP=172.16.2.93 clientIP=172.16.2.96) 1. download keychain-1.9.tar.bz2 into /home/satya/software/keychain from http://www.gentoo.org/projects/keychain/ 2. $ cd /home/satya/keychain $ tar -xjvf keychain-1.9.tar.bz2 3. copy the keychain script to your bin directory (/home/satya/bin) $ cd /home/satya/keychain/keychain-1.9 $ cp keychain /home/satya/bin 4. make sure /home/satya/bin is in you path. To do this add the following lines in /home/satya/.bash_profile PATH=$PATH:$HOME/bin export PATH unset USERNAME 5. kill off existing ssh-agent, if any: $ pkill ssh-agent 6. $ keychain /home/satya/.ssh/id_dsa enter the passphrase at prompt 7. the keychain script will create /home/satya/.ssh-agent-hostname (where hostname could be fsksm.utm.my). Make sure it has the following permission: $ ls -al .ssh-agent-* -rw------- 1 satya satya .ssh-agent-fsksm.utm.my 8. add the following lines in /home/satya/.bash_profile file: $HOME/bin/keychain $HOME/.ssh/id_dsa . $HOME/.ssh-agent-fsksm.utm.my 9. restart the computer. enter the passphrase when you login again. you will never be asked for anything whenever you: $ ssh 172.16.2.96