next up previous contents
Next: 5.2 SVMDNS Daemon Up: 5. DISTRIBUTED SIMULATION WITH Previous: 5. DISTRIBUTED SIMULATION WITH   Contents


5.1 PVM Requirement

PVM must be installed for this distributed simulation. The source code of PVM is available from its homepage:

http://www.csm.ornl.gov/pvm/pvm_home.html
For Windows users, a binary installer is provided. For other operating systems, the user must download the source code and manually compile it according to the readme file in the package. Fortunately, PVM binary is included in most Linux distributions, such as RedHat Linux 9.0, SuSE Linux 9.0 and Mandrake Linux 9.2.

Some environment variables must be set before using PVM in SVM. PVM_ROOT points to the path where PVM is installed (for RedHat Linux 9.0, it is /usr/share/pvm3). PVM_ARCH should be set to the operating system and architecture of the computer. Its value should be the same as the name of the only subdirectory in $PVM_ROOT/lib (the lib subdirectory in the path where PVM is installed). Use the following command to set the PVM_ARCH variable in Linux systems (assuming the shell is bash):

export PVM_ARCH=`ls -F $PVM_ROOT/lib | gawk 'sub(/\//, "");'`
PVM_RSH points to the remote shell to be used by PVM. PVM executes this shell program when it attempts to connect to another machine. If ssh is in the PATH environment variable, set PVM_RSH to ssh; otherwise, set it to the full path of the ssh program, for example, /usr/bin/ssh. If the user wants to run the PVM console from any directory, the path $PVM_ROOT/lib/$PVM_ARCH should be appended to the PATH environment variable.

To start the PVM daemon, run the PVM console with the pvm command, and enter quit in the PVM prompt. The PVM console is closed but the PVM daemon is running in the background. Alternately, use the following Linux command:

echo quit | pvm
To stop the PVM daemon, run the PVM console and enter halt, or execute:
echo halt | pvm

To add another machine to the current PVM daemon, start the PVM daemon on the local machine. Make sure the following conditions are met:

The add command in the PVM console adds a machine to the current PVM daemon. It has a single parameter which is the host name of the machine to be added. For example, the following commands start the PVM daemon and add machine pvm2.private.net to it:
echo quit | pvm
echo add pvm2.private.net | pvm

The following command displays the current configuration of the PVM daemon:

echo conf | pvm

Sometimes when PVM applications crash, the PVM daemon cannot be stopped or restarted because of the trash left in the temporary directory. This can be fixed by removing all the PVM temporary files from the temporary directory. For Linux, the following command is useful:

rm -rf /tmp/pvm*


next up previous contents
Next: 5.2 SVMDNS Daemon Up: 5. DISTRIBUTED SIMULATION WITH Previous: 5. DISTRIBUTED SIMULATION WITH   Contents
Thomas Huining Feng
2004-04-05