Debian 2.2.r3 and PVM Parallel Virtual Machine installation
This describes the process to install Debian on the Beowulf we have build (aka. Sorbox) and PVM.
We would like to say that nobody told us how to do this and we are not experts ( not yet :] ) on this, but that's what we did and it worked for us.
It's not necessary to have a own build hardware like Sorgobox to try this installation, a few networked computers could be used as well.
We hope that this lines could help to introduce you to supercomputing world, the best way to learn is to try to do it yourself.
This document is not far intended for experts, it's for newbies as ourselves.
Suggestions and comments are welcome.
Install debian base system (potato 2.2.r3)
on every computer run dselect configure it to get needed files from internet and type this commands:
apt-get install rsh-server
apt-get install telnetd
apt-get install telnet
This will download, install and activate rsh server, telnet server and the telnet client.
Add a user using:
you will be asked for a password, put whatever you want.
edit /etc/hosts using the simple text editor (vi)
This file contains all the local network IPs and aliases we want to use, they are easier to remember than IP numbers.
On the first test, we forgot to edit this file and the result was, that when we try to telnet to any of the computers we have to wait 2minutes or more before the login text were shown on the screen, this is because the computers tries to search that IP on internet before local network. So remember: It's important to edit this file on every computer.
our sample file /etc/hosts
Configuring rsh server
rsh daemon allows to run any command on the computer where it's installed, but we have to give permision to a computer or computers that are allowed to run commands.
ALL : 192.168.0.10
remove all the lines here
More information about this files here http://www.mkssoftware.com/docs/man4/rhosts.4.asp
Now its time to test rsh, create an account on master computer using the same username and password that we use on the slaves, log to the master computer using this account and try:
rsh 192.168.0.101 uname -a
this will show system info for 192.168.0.101 the same command is:
rsh s1 uname -a
here we're using alias s1 to refer the computer (easier to remember for humans)
Trying a the first parallel task: Shutting down all the computers.
Since on debian potato only root user could shutdown the box we need to install and configure this task so it can be done by any user.
sudo is a tool so any used we want could execute a command like root. We need to download and configure it:
Log to the box as root or as a normal user and then use su command, then:
apt-get install sudo
now we need to use a special editor to edit /etc/sudoers
sorgo ALL = NOPASSWD: ALL
log as a normal user and test it:
This will reboot the machine as we were root.
Now we can shutdown or reboot this slave computer from the master computer combining rsh and sudo:
Login from master computer as a normal user and type:
rsh s1 sudo /sbin/halt
One all the slave computers have sudo installed our first script could look like this:
for pcnames in $(cat beowulfnames.txt)
rsh $pcnames $1 $2 $3 $4 $5 $6 $7 $8 $9
beowulfnames.txt file would look like this:
remember to give execution permission to tot.sh so you can run it
chmod 755 tot.sh
./tot.sh sudo /sbin/halt
and all the computers will shutdown. You can test it pinging them. (ping s1 -c1)
On the server:
Create a directory /home/sorgo/shared
Edit /etc/exports and put this line
activate portmap server and nfs daemon
On the clients:
edit /etc/fstab and add this line:
192.168.0.10:/home/sorgo/shared /mnt/shared nfs rw 0 0
where 192.168.0.10 is the server IP and /home/sorgo/shared the directory on the server to be shared, /mnt/shared is where it will be mounted on the clients, nfs is the filesystem type, rw is read and write permission, and 0 0 as usual.
Now every client can write and read on the shared directoy localy mounted at /mnt/shared
Installing and Running PVM
PVM software and documentation can be found here
A free book about PVM:
PVM: Parallel Virtual Machine: A Users' Guide and Tutorial for Networked Parallel Computing
PVM (Parallel Virtual Machine) is a software package that permits a heterogeneous collection of Unix and/or NT computers hooked together by a network to be used as a single large parallel computer. Thus large computational problems can be solved more cost effectively by using the aggregate power and memory of many computers. The software is very portable. The source, which is available free thru netlib, has been compiled on everything from laptops to CRAYs.Download pvm source
compile it (make) and (make install) on the shared folder using master computer
on every slave computer edit the .bashrc file on the user home directory and add:
the file to modify is .bashrc because its used for non-loging shells, it's wrong to put this lines on .bash_profile because it's only executed when the users logs in, and it's not the case (we're using rsh)
you need to compile the example sources to test the system
go to examples directory and type
../lib/aimk master1 slave1
this will compile master1 and slave1 programs with aimk (architecture independent make)
start pvm on the master computer
spawn -> master1
spawn -> slave1
and your programs will run
With this software we were able to run the samples that comes with PVM, note that official documentation can be found on PVM website
Interesting PVM software freely available
A good software to try is PVM patch for POV-Ray http://pvmpov.sourceforge.net/ you could render an image using your supercomputer.
Hackers would like to check ZipCracker http://zipcracker.bengburken.net/ to crack zipped files with password by supercomputing bruteforce
Questions can be post on http://www.sorgonet.com Forum or by email to: drdoom at sorgonet dot com