NEW Sharing area
User documentation
Admin documentation
Development resources
Download
Private area

#!/bin/bash # This script is intended to wrap common sh command beahviour upon SGE qrsh. # Especially, the kill or ctrl-c will correctly cancel the SGE job using qdel. trap "abort" INT trap "abort" TERM abort() { echo "Abort queued process..." qdel $qid echo "Queued process aborted." } cmd=$1 input=$2 cwd=`pwd` qname="_"$$ export pid=$cwd/node.PID qrsh -V -N $qname -cwd $cmd $input >> out.txt & mid=$! sleep 1 if [ `grep "request could not be scheduled" out.txt | wc -w` != 0 ] ; then exit -1 fi lastq=`qstat | grep $qname | tail -1` qid=`echo ${lastq/ /} | cut -d" " -f1` wait $midThis sge.sh file is used instead of sh for launching code executable in the calculator.xml file.