Compiling and Executing PVM programs on theHIVE

PVM programs are compiled and executed from the host,
i.e usrhive or the drone.
1. Compiling C programs
To compile a program hello.c:
% cc -o hello -L/usr/local/pvm3/lib/LINUX -I/usr/local/pvm3/include hello.c \
-lpvm3 -lgpvm3
Once the program has been compiled, the executable has to be copied to the directory $HOME/pvm3/bin/LINUX directory on bees.
To copy the executable, ``hello'' to the bees:
% Pcp hello $HOME/pvm3/bin/LINUX
2. Compiling fortran programs
To compile a program hello.f:
% fort77 -o hello -L/usr/local/pvm3/lib/LINUX -I/usr/local/pvm3/include hello.f \
-lfpvm3 -lpvm3 -lgpvm3
Once the program has been compiled, the executable has to be copied
to the directory $HOME/pvm3/bin/LINUX directory on bees.
To copy the executable, ``hello'' to the bees:
% Pcp hello $HOME/pvm3/bin/LINUX
3. To execute a PVM program on the hive, simply precede your program name (and any arguments) by pvm_exe. For example, to execute hello (assuming hello is a stand alone program and doesn't have any arguments):
% pvm_exe hello
pvm_exe is simply a script that does the following for you:
1. Check for pvm daemon
2. Start the pvm daemon on all bees if it is not active.
3. Execute a remote shell on node ``b0" using the arguments to pvm_exe.
For example:
% rsh b0 hello
4. The pvm daemons can be started (this is really not necessary as pvm_exe automatically does this for you) and manipulated from usrhive. The following set of commands are available for this purpose:
% pvml
- starts the pvm daemon over the network.
% pvml i
- interactive mode
% pvml conf
- prints the virtual machine configuration
% pvml reset
- Use this command to kill all your pvm applications. However, if you have multiple pvm applications running, and needs to kill only one of them, you should go to the interactive mode (pvml i) and execute a kill from there for the appropriate task id.
% pvml restart
- To kill all pvm processes and restart the pvm daemon.
5. Instead of using pvm_exe and pvml commands from usrhive, one could always login to ``b0" and start the pvm daemons and execute the pvm based programs in the usual way.

Udaya A. Ranawake / NASA GSFC / udaya@neumann.gsfc.nasa.gov