PVM (Parallel Virtual Machine) is a software package that permits a heterogeneous collection of Unix and/or Windows 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.
PVM enables users to exploit their existing computer hardware to solve much larger problems at minimal additional cost. Hundreds of sites around the world are using PVM to solve important scientific, industrial, and medical problems in addition to PVM's use as an educational tool to teach parallel programming. With tens of thousands of users, PVM has become the de facto standard for distributed computing world-wide.
The default OSCAR installation tests PVM via a PBS job (see also:
Section 2.6 on page ).
However, some users may choose to use PVM outside of this context so a
few words on usage may be helpful 1.
The default location for user executables is $HOME/pvm3/bin/$PVM_ARCH. On an IA-32 Linux machine, this is typically of the form: /home/sgrundy/pvm3/bin/LINUX (replace ``LINUX'' with ``LINUX64'' on IA-64). This is where binaries should be placed so that PVM can locate them when attempting to spawn tasks. This is detailed in the pvm_intro(1PVM) manual page when discussing the environment variables PVM_PATH and PVM_WD.
The ``hello world'' example shipped with PVM demonstrates how one can compile and run a simple application outside of PBS. The following screen log highlights this for a standard user sgrundy (Solomon Grundy).
# Crate default directory for PVM binaries (one time operation) sgrundy: $ mkdir -p $HOME/pvm3/bin/$PVM_ARCH # Copy examples to local 'hello' directory sgrundy: $ cp $PVM_ROOT/examples/hello* $HOME/hello-example sgrundy: $ cd $HOME/hello-example # Compile a hello world, using necessary include (-I) and library # (-L) search path info as well as the PVM3 lib. sgrundy: $ gcc -I$PVM_ROOT/include hello.c -L$PVM_ROOT/lib/$PVM_ARCH \ > -lpvm3 -o hello sgrundy: $ gcc -I$PVM_ROOT/include hello_other.c -L$PVM_ROOT/lib/$PVM_ARCH \ > -lpvm3 -o hello_other # Move the companion that will be spawned to the default # PVM searchable directory sgrundy: mv hello_other $HOME/pvm3/bin/$PVM_ARCH
At this point you can start PVM, add hosts to the virtual machine and run the application:
# Start PVM and add one host "oscarnode1". sgrundy: $ pvm pvm> add oscarnode1 add oscarnode1 1 successful HOST DTID oscarnode1 80000 pvm> quit quit Console: exit handler called pvmd still running. sgrundy: $ # Run master portion of hello world which contacts the companion. sgrundy: $ ./hello i'm t40005 from t80002: hello, world from oscarnode1.localdomain # Return to the PVM console and terminate ('halt') the virtual machine. sgrundy: $ sgrundy: $ pvm pvmd already running pvm> halt halt Terminated sgrundy: $
An alternate method is to use options in the hostfile supplied to pvm when started from the command-line. The advantage to the hostfile options is that you don't have to place your binaries in the default location or edit any ``.dot'' files. You can compile and run the ``hello world'' example in this fashion by using a simple hostfile as shown here.
The example below uses the same ``hello world'' program that was previously compiled, but using a hostfile with the appropriate options to override the default execution and working directory. Remember that the ``hello'' program exists in the /home/sgrundy/hello-example directory:
sgrumpy: $ cat myhostfile * ep=/home/sgrundy/hello-example wd=/home/sgrundy/hello-example oscarnode1
The options used here are:
Now, we can startup pvm using this myhostfile and run the hello application once again.
# Now, we just pass this as an argument to PVM upon startup. sgrundy: $ pvm myhostfile pvm> quit quit Console: exit handler called pvmd still running. # The rest is the same as the previous example sgrundy: $ ./hello i'm t40005 from t80002: hello, world from oscarnode1.localdomain sgrundy: $ pvm pvmd already running pvm> halt halt Terminated sgrundy: $
The OSCAR installation of PVM makes use of the env-switcher
package (also see Section 2.10,
page ). This is where the system-wide
$PVM_ROOT, $PVM_ARCH
and $PVM_RSH
environment variable
defaults are set. Traditionally, this material was included in each
user's ``.dot'' files to ensure availability with non-interactive
shells (e.g. rsh/ssh). Through the env-ewitcher
package, a user can avoid any ``.dot'' file adjustments by using the
hostfile directive or default paths for binaries as outlined in the
Usage Section 2.8.1.
For additional information see also:
$PVM_ROOT/doc/*
root 2002-11-08