Before starting this example, the user must make some choices and also perform some setup operations. First, the user must decide which host of the virtual machine will be the development host. Next, the user must decide on the directory in which the source files will be kept. It is suggested, for this example, that the examples directory under the PADE top directory be used. Finally, the various environment variables and directory paths must be set as described in the example below.
The choice of development host is essentially one that makes development of programs most convenient for the user. Note that the development host need not even be the computer the developer actually sits in front of. If it is possible to use the xhost program to display the output of an X-Window application, run on the development host, (e.g. PADE) on another machine, then that machine can be used. The development host however, must be a node of the virtual machine because this host is defined to be the one on which the source code for all hosts resides and it will be the machine on which pvmmake looks for the source code.
The most important operation to be performed by the user before PADE is started is the setting of environment variables and directory paths. A file is provided with the PADE distribution in the examples directory to help with this task. An example of this file given below.
# # PADE_SETENV -- This file is used to set various # environment variables and directory paths needed by # the PADE program. The syntax of the commands in # this script assume that the user is running either # the csh or tcsh Unix shells. If the user is running # either the sh, ksh, or bash Unix shells, he or she # should use the PADE_EXPORT script. # # NOTE: Some of the environment variables and directory # paths set in this script may be set elsewhere, # (e.g., in the user's .cshrc file). If this is # the case, they need not be set here -- even if # they are labeled REQUIRED. # # You might want to add the relevant lines from this file to # your .cshrc # # Set the PADE_ROOT environment variable -- REQUIRED, # the PADE WILL NOT START without it! # example: setenv PADE_ROOT ~/nist_pade # setenv PADE_ROOT <put path-to-nist_pade/nist_pade here> # # Set the EDITOR environment variable -- OPTIONAL, however, # the first time the user tries to edit a file, PADE # will query the user for the name of a valid editor (full # path name allowed) if this variable is not set. # example: setenv EDITOR vi # setenv EDITOR <replace this with your favorite editor> # # Set the PVM_ROOT environment variable -- REQUIRED for # normal PVM execution. PADE will start but the user # will not be able to start PVM (version 3.3 or higher) and # PADE will not be able to perform its normal operations. # example: setenv PVM_ROOT /usr/local/apps/pvm3 # setenv PVM_ROOT <replace with the top of the PVM installation> # # Set the PVM_ARCH environment variable -- REQUIRED for # normal PVM execution. The variable is neeeded for the # same reasons as given for PVM_ROOT. # example: setenv PVM_ARCH `$PVM_ROOT/lib/pvmgetarch` # setenv PVM_ARCH <replace with your PVM_ARCH> # # Set the XPVM_ROOT environment variable -- OPTIONAL, this # variable is only needed if the user intends to invoke # XPVM. # example: setenv XPVM_ROOT /usr/local/apps/xpvm # setenv XPVM_ROOT <replace with the top of the XPVM installation> # # Set the TCL_LIBRARY environment variable -- REQUIRED, the # PADE main window will appear but without any functionality. # example: setenv TCL_LIBRARY /usr/local/apps/tcl/tcl7.3/library # setenv TCL_LIBRARY <replace with the TCL library directory> # # Set the TK_LIBRARY environment variable -- REQUIRED, the # PADE main window will appear, but without any functionality # example: setenv TK_LIBRARY /usr/local/apps/tcl/tk3.6/library # setenv TK_LIBRARY <replace with the TK library directory> # # Add the PVM executable directory to the PATH, if necessary. # set path=($path $HOME/pvm3/bin/$PVM_ARCH) # # Add the XPVM executable directory to the PATH, if necessary. # set path=($path $XPVM_ROOT/src/$PVM_ARCH) # # Add the caml_utils/$PVM_ARCH directory to the PATH, if necessary. # Note the caml_utils might be in a path different from $PADE_ROOT. # set path=($path $PADE_ROOT/caml_utils/$PVM_ARCH) # # Add the PADE_ROOT/pade directory to the PATH, if necessary. # set path=($path $PADE_ROOT/pade) # # Some people may want to add the PATHs to pvmd3, pvm, and aimk. # set path=($path $PVM_ROOT/lib/$PVM_ARCH $PVM_ROOT/lib) # # End of PADE setup fileThe user should now edit this file. Once this is done, the commands in this file can be executed using the command
source pade_setenvEquivalently, the pade_setenv file can be made an executable script and invoked by typing its name.
With these variables set, the user can now invoke PADE by typing its name at the command prompt. PADE will first read environment variables and then search the path for the standalone programs that it can potentially execute. The user should see the following message in the window in which PADE was invoked:
Welcome to PADE (1.0.0) Checking environment variables Checking commandsPADE will then proceed with a list of the standalone program that it was unable to find by searching the directories in the user's PATH. After this, the PADE main window (which is pictured in Fig. 5.1) should appear.