|
|
|
|
PVM Overview
The PVM software
provides a unified framework within which parallel programs can be developed in
an efficient and straightforward manner using existing hardware. PVM enables a
collection of heterogeneous computer systems to be viewed as a single parallel
virtual machine. PVM transparently handles all message routing, data conversion,
and task scheduling across a network of incompatible computer architectures.
The PVM computing model
is simple yet very general, and accommodates a wide variety of application
program structures. The programming interface is deliberately straightforward,
thus permitting simple program structures to be implemented in an intuitive
manner. The user writes his application as a collection of cooperating tasks.
Tasks access PVM resources through a library of standard interface routines.
These routines allow the initiation and termination of tasks across the network
as well as communication and synchronization between tasks. The PVM
message-passing primitives are oriented towards heterogeneous operation,
involving strongly typed constructs for buffering and transmission.
Communication constructs include those for sending and receiving data structures
as well as high-level primitives such as broadcast, barrier synchronization, and
global sum.
PVM tasks may possess
arbitrary control and dependency structures. In other words, at any point in the
execution of a concurrent application, any task in existence may start or stop
other tasks or add or delete computers from the virtual machine. Any process may
communicate and/or synchronize with any other. Any specific control and
dependency structure may be implemented under the PVM system by appropriate use
of PVM constructs and host language control-flow statements. Owing to its ubiquitous nature (specifically, the virtual machine concept) and also because of its simple but complete programming interface, the PVM system has gained widespread acceptance in the high-performance scientific computing community.
The PVM System The
PVM system is composed of two parts. 2.)The
second part of the system is a library of PVM interface routines. It contains a
functionally complete repertoire of primitives that are needed for cooperation
between tasks of an application. This library contains user-callable routines
for message passing, spawning processes, coordinating tasks, and modifying the
virtual machine. Setup to Use PVM
PVM uses two
environment variables when starting and running. Each PVM user needs to set
these two variables to use PVM. The first variable is PVM_ROOT, which is set to
the location of the installed pvm3
directory. The second variable is PVM_ARCH, which tells PVM the architecture of
this host and thus what executables to pick from the PVM_ROOT directory. The
easiest method is to set these two variables in your. bashrc file. The entry in
.bashrc file is given below. Setup Summary ¨
Set
PVM_ROOT and PVM_ARCH in your .bashrc file ¨
Build PVM
for each architecture type ¨
Create a
.rhosts file on each host listing all the hosts you wish to use ¨
Create a $HOME/.xpvm_hosts
file listing all the hosts you wish to use prepended by an ``&''.
Starting
PVM
Before we go over the steps to compile and run parallel PVM programs, you should
be sure you can start up PVM and configure a virtual machine. On any host on
which PVM has been installed you can type % pvm and
you should get back a PVM console prompt signifying that PVM is now running on
this host. Important command related to PVM are given below:
1.) You can add hosts to your virtual machine by typing at the console prompt pvm> add hostname 2.) You can delete hosts (except the one you are on) from your virtual machine by typing pvm>
delete hostname 3.)
To see what the present virtual machine looks like, you can type pvm>
conf 4.) To see what PVM tasks are running on the virtual machine, you type pvm> ps -a 5.)
If you type ``quit" at the console prompt, the console will quit but
your virtual machine and tasks will continue to run. 6.)
When you are finished with the virtual machine, you should type pvm> halt This
command kills any PVM tasks, shuts down the virtual machine, and exits the
console. This is the recommended method to stop PVM because it makes sure that
the virtual machine shuts down cleanly. Running PVM Programs: The
first step is to copy the example programs into your own area: %
cp -r $PVM_ROOT/examples $HOME/pvm3/examples %
cd $HOME/pvm3/examples The examples directory contains a Makefile.aimk and Readme file that describe how to build the examples. PVM supplies an architecture-independent make, aimk, that automatically determines PVM_ARCH and links any operating system specific libraries to your application. aimk was automatically added to your $PATH when you placed the bashrc.stub in your .bashrc file. Using aimk allows you to leave the source code and makefile unchanged as you compile across different architectures.
The master/slave
programming model is the most popular model used in distributed computing. To
compile the master/slave C example, type %
aimk master slave The makefile moves the executables to $HOME/pvm3/bin/PVM_ARCH, which is the default location PVM will look for them on all hosts. If your file system is not common across all your PVM hosts, then you will have to build or copy (depending on the architectures) these executables on all your PVM hosts. Now, from one window, start PVM and configure some hosts. XPVM: There are other ways to start up PVM. The functions of the console and a performance monitor have been combined in a graphical user interface called XPVM, which is available precompiled on netlib. If XPVM has been installed at your site, then it can be used to start PVM. To start PVM with this X window interface, type % xpvm Different views of XPVM 1.) Network view: The Network view displays the present virtual machine
configuration and the activity of the hosts. 2.) Space-Time view: The Space-Time view displays the activities of individual PVM tasks that are running on the virtual machine. The Space-Time view combines three different displays. §
The first
is like a Gantt chart . §
The
second display overlays the first display with the communication activity among
tasks. § The third display appears only when a user clicks on interesting features of the Space-Time view with the left mouse button. 3.) Task utilization vs. time view: The Utilization view shows the number of tasks computing, in overhead, or waiting for each instant. 4.) Tall trace view: The Call Trace view provides a textual record of the
last PVM call made in each task. 5.) Task output view: This view gives the user the option to also redirect the output into a file. If the user types a file name in the ``Task Output'' box, then the output is printed in the window and into the file. |
|
Send mail to linuxcluster@rediffmail.com with
questions or comments about this web site.
|