* ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * -------------------------------------------------------------------------- | This directory contains a simple Fortran example for PVM and PVMe -------------------------------------------------------------------------- | | Filename Style Description | -------- ----- ----------- | manager.f MPMD A basic "hello world" type program | worker.f | -------------------------------------------------------------------------- | Please direct any questions, comments or suggestions | to karin@cam.nist.gov. -------------------------------------------------------------------------- This directory includes the following files: README.pvm (this file) * ORNL PVM * README.pvme make.pvme make.pvm manager.f worker.f To interactively run the sample program under ** ORNL PVM ** : 0) If this is your first use of the interactive nodes, make sure you have read and followed the instructions in ../README.FIRST !! You will be asked to add lines to your .cshrc file, copy the sample directory to your own area, AND LOGIN TO ONE OF THE INTERACTIVE NODES (grand17-20) 1) After logging into an interactive node, switch to the ORNL PVM environment: prompt> startpvm (If pvm is your default environment, set in your .cshrc file, and you haven't switched to pvme, then you can skip the startpvm step. See ../README.FIRST for more information.) In your copy of the sample directory, type: prompt> make -f make.pvm The makefile will direct the compilation and linking of the programs. The executables are created in the current directory in this example, but this can be changed to the default executable directory, $HOME/pvm3/bin/RS6K, by editing the EXEDIR entry in the makefile. It's highly recommended that you *first* run through the example "as is", and then experiment with modifications after you've confirmed that the basic example works for you. 2) Generate a hostfile for the interactive pool. This can be easily done by running the command: prompt> set_pvm_pool In an interactive setting, this command will generate a hostfile (named "hostfile") which contains the 4 available interactive nodes, and uses the current working directory as the PVM working directory and executable path. (The hostfile can later by modified to suit your needs.) 3) In the sample directory, start the PVM daemon on the nodes of the interactive pool by typing: prompt> pvmd3 hostfile & <-- NOTE: the ampersand is important! If omitted, you must push the job to the background to continue. 4) Check the configuration through the pvm console: prompt> pvm [RETURN] pvmd already running. pvm> conf [RETURN] 4 hosts, 1 data format HOST DTID ARCH SPEED grand17.nist.gov 40000 RS6K 1000 grand18.nist.gov 80000 RS6K 1000 grand19.nist.gov c0000 RS6K 1000 grand20.nist.gov 100000 RS6K 1000 pvm> quit [RETURN] prompt> (Other responses, such as only one host being listed, are a sign that something has not gone right. Please contact karin@cam.nist.gov.) 5) Run the program by typing: prompt> manager You will be prompted to enter the number of processes you wish to spawn. (NOTE: although PVM does not limit the number of spawned processes, the dimension of the array of process ids does impose an effective limit. In this example, *the limit is 32*.) Run the program as many times as you like to verify the output.... 6) Examine the results file generated by the manager program: prompt> cat manager.results 7) Upon completion, halt PVM: prompt> pvm [RETURN] pvm> halt [RETURN] prompt> 8) Clean up... type: prompt> make -f make.pvm new This will remove the executable, object, output and error files, to restore the directory to its original state. -------------------------------------------------------------------- | Again, | please direct any questions, comments or suggestions | to karin@cam.nist.gov. --------------------------------------------------------------------