1 |
#! /bin/csh -f |
2 |
|
3 |
set HERE = $cwd |
4 |
|
5 |
if ($?WORKFLOW_ROOT) then |
6 |
set WFDIR = $WORKFLOW_ROOT |
7 |
set WFCODE = $WORKFLOW_ROOT |
8 |
else |
9 |
echo Need WORKFLOW_ROOT variable to be set. |
10 |
exit 1 |
11 |
endif |
12 |
|
13 |
set wantlow = `cat wantlow` |
14 |
set wanthigh = `cat wanthigh` |
15 |
|
16 |
set TEMPLOG = $HERE/runlog |
17 |
set timestr = `echo $wantlow | sed -e 's/[._:]//g' -e 's/^......//' -e 's/..TAI//'` |
18 |
set TEMPCMD = $HERE/"IMG"$timestr |
19 |
echo 0 > retstatus |
20 |
|
21 |
# make qsub script |
22 |
echo "#! /bin/csh -f " >$TEMPCMD |
23 |
echo "cd $HERE" >>$TEMPCMD |
24 |
echo "hostname >>&$TEMPLOG" >>$TEMPCMD |
25 |
echo "$WFCODE/scripts/makeimageslowhigh $wantlow $wanthigh >>&$TEMPLOG" >>$TEMPCMD |
26 |
echo 'set retstatus = $?' >>$TEMPCMD |
27 |
echo 'echo $retstatus >' "$HERE/retstatus" >>$TEMPCMD |
28 |
echo "rm -f $HERE/qsub_running" >>$TEMPCMD |
29 |
|
30 |
# execute qsub script |
31 |
touch qsub_running |
32 |
qsub -sync yes -e $TEMPLOG -o $TEMPLOG -q j.q,o.q $TEMPCMD |
33 |
|
34 |
if (-e retstatus) set retstatus = `cat $HERE/retstatus` |
35 |
exit $retstatus |
36 |
|