[amit@onyx amit]$ pvmrun -h pvmrun: $Id: pvmrun.c,v 1.8 2004/09/02 00:00:28 amit Exp $ Usage: pvmrun -np <#tasks> <executable> {<args>,...} ************************************************************************ For a pvm master/slave program: pvmrun -np 1 <executable> {<args>,...} For a pvm n-way spmd program: pvmrun -np n <executable> {<args>,...} The list of machines to use for PVM is determined as follows: if PBS_NODEFILE is set, then use the file specified by PBS else: exit and ask user to run after getting nodes using pbsget. [amit@onyx amit]:
The pvmrun program starts the pvm system for you, runs your application (either master/slave MPMD style or SPMD style) and then cleanly shuts down the PVM system. If the PVM system is already running, it shuts it down and restarts it with the list of nodes supplied by the PBS system. You must use pvmrun in your PBS batch jobs.
The following shows the usage of pvmrun to run a parallel program. Note that we show the program being run twice. The second time we have redirected the standard error output from pvmrun to a file so only the output from the application shows up.
[amit@onyx parallel_sum]$ pbsget -4 ##################################################################### Allocate cluster nodes via PBS for running interactive parallel jobs. ##################################################################### Trying for 4 nodes ... qsub: waiting for job 850.onyx.boisestate.edu to start qsub: job 850.onyx.boisestate.edu ready [amit@onyx PBS ~/cs430/lab/PVM/parallel_sum]:pvmrun -np 4 spmd_sum 10000 pvmrun: Using host file: /var/spool/pbs/aux/850.onyx.boisestate.edu pvmrun: Probing for pre-existing PVM. *********************************************************** libpvm [pid10012] /tmp/pvmd.999: No such file or directory libpvm [pid10012] /tmp/pvmd.999: No such file or directory libpvm [pid10012] /tmp/pvmd.999: No such file or directory libpvm [pid10012]: pvm_mytid(): Can't contact local daemon *********************************************************** pvmrun: PVM not running. Ignore error messages above from pvm_mytid(). pvmrun: Succeeded in starting new PVM daemon! Selected nodes from file: /var/spool/pbs/aux/850.onyx.boisestate.edu ************************************************* ws00 ws04 ws03 ws02 ws01 ************************************************* pvmrun: Succeeded in adding 5 hosts. pvmrun: Parallel Virtual Machine configuration ----------------------------------------------- ws00 ws04 ws03 ws02 ws01 ----------------------------------------------- [tc0001] BEGIN [t100001] BEGIN [t140001] BEGIN [t80001] BEGIN [t80001] I got 2500 from 0 [t80001] I got 2500 from 1 [t80001] I got 2500 from 2 [t80001] I got 2500 from 3 [t80001] The total is 10000 [t100001] EOF [tc0001] EOF Received PvmTaskExit notification from task id 100001 Received PvmTaskExit notification from task id c0001 [t140001] EOF [t80001] EOF Received PvmTaskExit notification from task id 140001 Received PvmTaskExit notification from task id 80001 pvmrun: 4 tasks finished! pvmrun: Halting PVM. pvmrun: End of PVM application. [amit@onyx PBS ~/cs430/lab/PVM/parallel_sum]:pvmrun -np 4 spmd_sum 10000 2> errorlog [tc0001] BEGIN [t140001] BEGIN [t100001] BEGIN [t80001] BEGIN [tc0001] EOF [t140001] EOF [t80001] I got 2500 from 0 [t80001] I got 2500 from 1 [t80001] I got 2500 from 3 [t80001] I got 2500 from 2 [t80001] The total is 10000 [t100001] EOF [t80001] EOF [amit@onyx PBS ~/cs430/lab/PVM/parallel_sum]:exit logout qsub: job 850.onyx.boisestate.edu completed [amit@onyx parallel_sum]$