| 4 |
# 1/ compiling on head node (tx7.awi.de), with -norun option |
# 1/ compiling on head node (tx7.awi.de), with -norun option |
| 5 |
# 2/ running on compute node (using PBS qsub), with -runonly option |
# 2/ running on compute node (using PBS qsub), with -runonly option |
| 6 |
# 3/ evaluating result on head node with -runonly option |
# 3/ evaluating result on head node with -runonly option |
| 7 |
# |
# |
| 8 |
# Notes: |
# Notes: |
| 9 |
# - step 2 leads to many error messages, because the OS on the compute |
# - step 2 leads to many error messages, because the OS on the compute |
| 10 |
# nodes does not have the appropriate shell tools, modifying the |
# nodes does not have the appropriate shell tools, modifying the |
| 11 |
# runonly option to skip the evalution step would be nice but not |
# runonly option to skip the evalution step would be nice but not |
| 96 |
|
|
| 97 |
checkOut=2 |
checkOut=2 |
| 98 |
|
|
| 99 |
|
gitcmd=$HOME/git/git |
| 100 |
tmpFil=$TDIR/error.out |
tmpFil=$TDIR/error.out |
| 101 |
if [ $checkOut -le 1 ] ; then |
if [ $checkOut -le 1 ] ; then |
| 102 |
if test -e $TDIR/${gcmDIR}/doc ; then |
if test -e $TDIR/${gcmDIR}/doc ; then |
| 125 |
test -e $TDIR/${gcmDIR} && rm -rf $TDIR/${gcmDIR} |
test -e $TDIR/${gcmDIR} && rm -rf $TDIR/${gcmDIR} |
| 126 |
echo " done" |
echo " done" |
| 127 |
echo -n "Make a new clone of $git_code from repo: $git_repo ..." |
echo -n "Make a new clone of $git_code from repo: $git_repo ..." |
| 128 |
git clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil |
${gitcmd} clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil |
| 129 |
retVal=$? |
retVal=$? |
| 130 |
if test $retVal = 0 ; then |
if test $retVal = 0 ; then |
| 131 |
echo ' --> done!' |
echo ' --> done!' |
| 138 |
fi |
fi |
| 139 |
else |
else |
| 140 |
echo "Updating current clone ( $git_code ) ..." |
echo "Updating current clone ( $git_code ) ..." |
| 141 |
( cd ${gcmDIR}; git checkout master ; git pull ) |
( cd ${gcmDIR}; ${gitcmd} checkout master ; ${gitcmd} pull ) |
| 142 |
echo ' --> done!' |
retVal=$? |
| 143 |
|
if test $retVal = 0 ; then |
| 144 |
|
echo ' --> done!' |
| 145 |
|
else |
| 146 |
|
echo " Error: 'git pull' returned: $retVal" |
| 147 |
|
echo " Error: 'git pull' returned: $retVal" \ |
| 148 |
|
| mail -s "Git-error on Stan" Martin.Losch@awi.de |
| 149 |
|
exit 2 |
| 150 |
|
fi |
| 151 |
fi |
fi |
| 152 |
else |
else |
| 153 |
cd $TDIR |
cd $TDIR |
| 195 |
# keep looking for the job in the job queues and wait until has disappeared |
# keep looking for the job in the job queues and wait until has disappeared |
| 196 |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
| 197 |
while [ "${jobruns}"x != x ] |
while [ "${jobruns}"x != x ] |
| 198 |
do |
do |
| 199 |
sleep 200 |
sleep 200 |
| 200 |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
| 201 |
echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete" |
echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete" |