5
echo "Use: sge_submit_workers [options] <servername> <port> <num-workers>"
7
echo " -a Enable auto mode."
8
echo " -s Run as a shared worker."
9
echo " -N <name> Preferred master name."
10
echo " -C <catalog> Set catalog server to <catalog>. <catalog> format: HOSTNAME:PORT."
11
echo " -t <time> Abort after this amount of idle time. (default=900s)"
12
echo " -p <parameters> SGE qsub parameters."
13
echo " -h Show this help message."
21
while getopts asN:t:p:h opt
24
a) arguments="$arguments -a"; use_auto=1;;
25
s) arguments="$arguments -s";;
26
N) arguments="$arguments -N $OPTARG";;
27
C) arguments="$arguments -C $OPTARG";;
28
t) arguments="$arguments -t $OPTARG";;
29
p) parameters="$parameters $OPTARG";;
35
shift $(expr $OPTIND - 1)
37
if [ $use_auto = 0 ]; then
55
worker=`which work_queue_worker 2>/dev/null`
58
echo "$0: please add 'work_queue_worker' to your PATH."
62
qsub=`which qsub 2>/dev/null`
65
echo "$0: please add 'qsub' to your PATH."
69
mkdir -p ${USER}-workers
75
./work_queue_worker $arguments $host $port
80
for n in `seq 1 $count`
82
qsub -cwd $parameters worker.sh