3 # Conv-host for bluegenep:
4 # Translates +pN-style conv-host options into
6 # The script qsub the job, wait until it finishes, and print the output.
7 # good for job less than 30 minutes
29 pes
=`echo $1 | awk '{print substr($1,3)}'`
33 args
=" "$1" "$2" "$args
37 args
=" "$1" "$2" "$args
52 test $QUIET -eq 0 && printf "\nRunning on $pes processors: $args\n"
54 if test -n "$COBALT_JOBID"
56 # charmrun called from script
57 test $QUIET -eq 0 && echo "Running> cobalt-mpirun -nofree -env BG_MAXALIGNEXP=0 -np $pes $args"
58 cobalt-mpirun
-nofree -env BG_MAXALIGNEXP
=0 -np $pes $args
68 test $QUIET -eq 0 && echo "Submitting batch job for> $pes $args"
69 test $QUIET -eq 0 && echo " using the command> $queue_sub -t 30 -n $pes $args"
73 jobid
=`$queue_sub -t 30 -n $pes $args 2>err.$$ |tail -1`
74 if grep 'not found' err.$$
> /dev
/null
82 test $QUIET -eq 0 && echo "Job enqueued under job ID $jobid"
88 echo "Charmrun> $queue_kill $jobid ..."
94 # kill job if interrupted
97 # Wait for the job to complete, by checking its status
100 $queue_stat $jobid > tmp.$$
103 if test $exitstatus -ne 0
105 # job not in the queue now
106 status
=`tail -1 $err | sed 's/.*Exit status:[ ]*\([0-9\]*\).*/\1/'`
111 if grep 'Failed to boot the partition' $err > /dev
/null
2>/dev
/null
113 echo "Failed to boot the partition, retrying."