NAME
spawn2 - spawns the same job across multiple processors.
SYNOPSIS
spawn2 [ -cmd commands ] [ -totalnodes totalnodes ] [
-nodelist nodelist ] [ -N ] [ -V ] [ -h ]
DESCRIPTION
spawn2 takes commands and spawns them into seperate jobs
(either on different machines through rsh or on the same
machine through forks). spawn2 can be used on a CPU inten-
sive job to split it across several machines.
OPTIONS
spawn2 accepts the following command line options:
-cmd commands
Specifies the commands to be executed.
-totalnodes totalnodes
Indicates how many nodes you want to use.
-nodelist nodelist
Indicates which nodes you want to use. The argument
nodelist has the format node1:node2:node3:...:nodeN.
When -nodes is not specified, jobs will be spawn2ed
locally.
-V Verbose mode.
-N No halt on error conditions.
-h Help.
EXAMPLES
The following spawn2 executes a "pwd" twice on 3 different
machines.
spawn2 -cmd "pwd; pwd" -nodes gpsa:gpsb:gpsc
The following command executes two pwd commands 5 times on
the local machine.
spawn2 -cmd "pwd; pwd" -totalnodes 5
Note that to get return codes from the last command in a
list of commands (such as "pwd; pwd", for example), you must
connect the commands with &&. The following command exe-
cutes cmd1. If unsuccessful, the return code is returned.
Otherwise, cmd2 is executed. If unsuccessful, the return
code is returned. Otherwise, ... etc.
spawn2 -cmd "cmd1 && cmd2 && cmd3 && cmd4"
The total number of nodes and the node number can be pass to
the command through the following variables.
spawn2 -cmd "echo {totalnodes} {nodenumber}" -total-
nodes 2
FILES
~/.rhosts list of valid remote hostnames.
AUTHOR
Douglas Horn, Affordable Systems, Inc. (1994) Kelly D. Craw-
ford, APR (1993).
COPYRIGHT
copyright 2001, Amoco Production Company
All Rights Reserved
an affiliate of BP America Inc.
Man(1) output converted with
man2html