Using PVM (3.3.10) in the CSAM Department at IIT
This page contains information about the PVM & XPVM setup for users of the deltas cluster. There is extensive PVM information and documentation available on the
WWW. A good starting point is the Oak Ridge National Laboratory - Computer Sciences Group where the PVM package was developed.
Here is what you need to do to start using PVM on the deltas (for csh users).
- Add these lines to your .cshrc file:
setenv PVM_ROOT /a/apps/pvm3
setenv PVM_ARCH SGI5
set path=($path $PVM_ROOT/lib/SGI5)
setenv XPVM_ROOT /a/apps/xpvm
- Make sure you don't have anything in .cshrc that will attempt to do I/O (read from the keyboard or write something
on the console), since this will interfere with the PVM start-up process.
If, for instance, you have a line that reads
news
then move this into the .login file since `news' will attempt to print a message.
- Create the directory where you will keep your PVM application(s)
mkdir ~/pvm3
mkdir ~/pvm3/bin
mkdir ~/pvm3/bin/SGI5
- Create a file called .rhosts in your home directory with the name of the host from which you will start
pvm: if you plan to start pvm from delta5, for instance, then the file .rhosts will contain:
delta5
If you plan to be able to start PVM from more than one host, then add the
name of each of them in the .rhosts file, one per line.
- Set proper permissions for the .rhosts file:
chmod go-rwx .rhosts
- In the ~/pvm3/bin/SGI5/ create a host file (the name is up to you, but let's say it is myhostfile) which lists all the hosts on which the PVM daemon will be started:
delta5
delta0
delta1
delta2
The above host file assumes you'll be using up to four hosts, with their
names listed at the beginning of each line. If you start the PVM daemons
using pvmd3, then a daemon will be started on each host listed in myhostfile.
We strongly recommend you to use a standard setup for your PVM configuration.
Many software tools developed around PVM rely on the standard configuration
to do their work: using a non-standard configuration calls for trouble in
the future when you will try to use some of those tools.
The custmized environment described below allows you to do your work in
a different directory than the standard ~/pvm3/bin/SGI5/
Here is what you need to do to start using PVM on the deltas (for csh users).
- Add these lines to your .cshrc file:
setenv PVM_ROOT /a/apps/pvm3
setenv PVM_ARCH SGI5
set path=($path $PVM_ROOT/lib/SGI5)
setenv XPVM_ROOT /a/apps/xpvm
- Make sure you don't have anything in .cshrc that will attempt to do I/O (read from the keyboard or write something
on the console), since this will interfere with the PVM start-up process.
If, for instance, you have a line that reads
news
then move this into the .login file since `news' will attempt to print a message.
- Create the directory where you will keep your PVM application(s)
cd
mkdir my_pvm
- Create a file called .rhosts in your home directory with the name of the host from which you will start
PVM: if you plan to start PVM from delta5, for instance, then the file .rhosts will contain:
delta5
- Set proper permissions for the .rhosts file:
chmod go-rwx .rhosts
- Assuming that you want to keep your PVM executables in the directory called my_pvm, under your home directory, create in that directory a host file (the
name is up to you, but let's say it is myhostfile) with the following contents:
delta5 ep=$HOME/my_pvm wd=$HOME/my_pvm
delta0 ep=$HOME/my_pvm wd=$HOME/my_pvm
delta1 ep=$HOME/my_pvm wd=$HOME/my_pvm
delta2 ep=$HOME/my_pvm wd=$HOME/my_pvm
The above host file assumes you'll be using up to four hosts, with their
names listed at the beginning of each line.
- Include the needed PVM header file in each file of your application where
pvm calls are made. If your application is written in C, then do
#include "pvm3.h"
- Compile your application making sure that
- the PVM header files are found ( -I/a/apps/pvm3/include )
- the PVM directories are searched before any others ( -L/a/apps/pvm3/lib/SGI5 )
- needed libraries are available for linking ( -lpvm3 )
A makefile which builds an executable from two source files can be downloaded.
- Start the PVM daemon on all machines listed in myhostfile
pvmd3 myhostfile &
- Change your working directory
cd ~/pvm3/bin/SGI5/
- Copy the example files in your working directory
cp /a/apps/pvm3/examples/hello.c .
cp /a/apps/pvm3/examples/hello_other.c .
make -f make_hello
- Start the PVM daemon, if it's not already running, on the hosts listed in
your hostfile (let's assume it is called myhostfile)
pvmd3 myhostfile &
- Run the example (issue the command several times)
hello
hello
hello
hello
man -M /a/apps/pvm3/man pvm_intro
Some documentation is available in /a/apps/pvm3/doc/
- XPVM can be started with some flags in the command line. To learn which
flags are available do
xpvm -HELP
Yes, you use capitals!
This page has been created (May 26, 1996) by: Virgil Bistriceanu - virgil@csam.iit.edu
This page is maintained by: Virgil Bistriceanu - virgil@csam.iit.edu
Last update: September 25, 1996