Expressing PVM (Version 3.4): Parallel Virtual Machine

Submitted By yypatel
Words: 7876
Pages: 32

Practical : 1

AIM: INSTALLING PVM (version 3.4) :Parallel Virtual Machine

WHAT IS PVM?

PVM is a software system that enables a collection of heterogeneous computers to be used as a coherent and flexible concurrent computational resource, or a "parallel virtual machine".

The individual computers may be shared- or local-memory multiprocessors, vector supercomputers, specialized graphics engines, or scalar workstations and PCs, that may be interconnected by a variety of networks, such as Ethernet or FDDI.

PVM consists of a run-time environment and library for message-passing, task and resource management, and fault notification. While PVM will not automatically make a commerical software package run faster, it *does* provide a powerful set of functions for manually parallelizing an existing source program, or for writing new parallel / distributed programs.

The PVM software must be specifically installed on every machine that is to be used in your "virtual machine". There is no "automatic" installation of executables onto remote machines in PVM, although simply copying the pvm3/lib and pvm3/bin directories to another *similar* machine (and setting $PVM_ROOT and $PVM_ARCH - see below) is sufficient for running PVM programs. Compiling or building PVM programs requires the full PVM installation.

User programs written in C, C++ or Fortran can access PVM through provided library routines.

STARTING AND STOPPING PVM

To start PVM, run $PVM_ROOT/lib/pvm. This starts the console task, which in turn starts a pvmd if one is not already running. More hosts can be started and added to your "virtual machine" by using the console "add" command.

To start the pvmd without starting the console, you can also run the $PVM_ROOT/lib/pvmd directly. A number of hosts can all be started at once by supplying the pvmd with a host file, as in:

$PVM_ROOT/lib/pvmd my_hosts

where "my_hosts" contains the names of the hosts you wish to add, one host per line. See the pvmd man page for other host file options.

To stop PVM, use the PVM console command "halt". From within your user programs, you can use the pvm_halt() function. You can also kill the pvmd3 process (always use a catchable signal such as SIGTERM). But, if you do kill the pvmd, or if it fails for some other reason, always be sure to remove any leftover /tmp/pvmd. pvmd socket files, where is your numerical user id. These files will make PVM think a pvmd is running, and can cause the dreaded "Can't Start Pvmd" message.

Practical :2

AIM: To establish Bewaulf Cluster using MPI(Message Passing Interface) Library.

DESCRIPTION:
A cluster is a group of computers which work together toward a final goal like to get faster processing, increasing processing speed.MPI is most popular package for message passing with in parallel program. It is a simply a library of definition and functions that can be used in C/C++ (Fortran) programs.

CONFIGURATION:
STEP 1: Installing linux in all nodes of Cluster.

For Master node, it is recommended to use separate partitions, while slave node swap partition can be used.

STEP 2: Installing MPICH in all nodes of Cluster.

Create a directory MPI(we can use any name) in the home directory.
$ cd $HOME
$ mkdir MPI

Unpack the tar file. gunzip mpich.tar.gz

$ tar xfz mpich2-1.4.tar

Rename folder that contain mpich.
$ mv mpich2-1.4 mpich

Configure(activate ) services for access authentication.
./configure rsh=ssh

Build MPICH2 $ make

Install the MPICH2 commands. $ make install

Add the bin directory to your path. $ export PATH=$PATH:/usr/local/mpich/bin

$ which mpd
$ which mpicc
$ which mpiexec
$ which mpirun
All should refer commands in the bin subdirectory of our install directory.

The MPI has been successfully installed now. We can follow the same steps to install MPI in other