PVM is a package of software to facilitate parallel programming on a set of computers that are connected by a fast network. PVM stands for "Parallel Virtual Machine", and this acronym describes the software well. Classical parallel computers comprise a collection of processors, each connected by a fast bus to the others, and possibly to a segment of memory. The virtual machine described by PVM is a collection of processors (inside the individual computers), connected by a network. Each processor has access to the local memory on the computer in which it resides, and may also have access to a shared memory area for the network. PVM does not require the machines which constitute it to be identical. Indeed, they do not even have to run the same operating system. Thus, PVM provides a very flexible framework in which to run parallel computations on an arbitrary number of heterogeneous processors.
The intent of this document is to provide a brief description of the architecture and details of PVM at the computing site in Mathematics at WSU. For details of the operation of PVM, you must consult the PVM book that may be found in Neill Hall room 3.
At our site, PVM has been installed at /usr1/pvm3. The /usr1 directory is mounted (using NFS) by almost every UNIX computer in the department, so PVM has access to a large shared memory area, in addition to the local memory of the computer on which each processor resides. The network connecting the processors uses switched ethernet at 10 and 100 Mbs. PVM currently has been compiled for Silicon Graphics, DEC AXP, and HP 9000 computers, with eight nodes enabled. The nodes available, together with the type of processor, are listed below.
Computer Type Theta, Matt DEC AXP Bass, Salmon Silicon Graphics Indy Omega, Phi, HP 9000 Psi, Tau
Eventually, four Sun Sparcstations will be added to this number (after an operating system upgrade). It is not necessary to use all of the nodes to create the virtual machine. You may choose to create machine with any number of processors from one to eight.
PVM may be run from the command line on any of the machines above. There is also an X-windows front-end program that runs on theta. The front-end is called xpvm. It displays the nodes that currently constitute the virtual machine. It also displays the status of each node, describing whether the node has been assigned a task, is waiting for a task, or is communicating with the master process. Other views of the operation of the virtual machine are also available.
To prepare your account for PVM, log onto a UNIX machine, such as theta, and type pvmprep. This modifies your .login file so that certain environment variables are set properly. It also creates a directory called pvm3 where you may do your development work. You should never have to type pvmprep a second time. After that, you need only to run PVM itself, either using the console, or using xpvm.
To use the console, simply log onto one of the machines on which pvm is installed, and type pvm. A prompt of form pvm> should appear. At this prompt, you may type any of a number of commands, as summarized in the table below. The notation <arg> indicates a user-supplied argument.
Command Function
add <hostname> adds the host named hostname to the virtual
machine.
delete <hostname> deletes the host named hostname from the virtual
machine.
halt kills all processes including the console, and then
shuts down PVM. This is the usual, and proper, way
to quit PVM.
help <commandname> provides on-line help about the command named
commandname.
jobs prints a list of running jobs.
kill terminates a PVM process.
ps -a lists processes on the virtual machine, with
details.
quit exits the console, without shutting down PVM
processes.
reset kills all PVM processes except the console.
spawn <program> starts the PVM application named <program>. This
is the customary way to run your PVM programs.
The console reads a file named .pvmrc in your home directory before reading commands from the terminal, so you may initialize your PVM session. For details of this, and for other commands and options, consult the more extensive PVM documentation in room 3.
A second way to run PVM is to use X-windows. Log onto theta, and type xpvm. A window will appear with menu items for the commands listed in the table, as well as others. When closing either the console or xpvm, remember to use the halt command. Otherwise your processes and all of the PVM daemons will remain running.
All PVM development work should be done in a subdirectory of your pvm3 directory. This was created when you typed pvmprep. At the same time, a subdirectory called pvm3/examples was created, and links to the main PVM directories include and lib were established. This is done so that the makefiles that came with the PVM distribution do not require sophisticated modifications. You may compile and run programs from the examples directory, or you may create your own directory, e.g. /pvm3/mydir, on which you may create your own code. You may use either C or Fortran, or even mix the two languages.
Write the PVM code using the instructions given in the more extensive documentation in room 3. To compile a PVM code, you must log onto one machine of each operating system for which you plan to run a node, and type
aimk masterprogram slaveprogram
where, of course, masterprogram is the name of the file containing the code that controls the job, while slaveprogram is the name of the file that contains code that drives the processes that are spawned by the master program. After the program is compiled, you may run it by spawning masterprogram from the PVM console, or from xpvm.