| 1 |
#!/bin/bash -x |
#!/bin/bash |
| 2 |
# new script for running testreport on sx8.awi.de |
# new script for running testreport on sx8.awi.de |
| 3 |
# - split the testreport into 3 steps: |
# - split the testreport into 3 steps: |
| 4 |
# 1/ compiling on head node (tx7.awi.de), with -norun option |
# 1/ compiling on head node (tx7.awi.de), with -norun option |
| 73 |
fi |
fi |
| 74 |
mkdir $TDIR |
mkdir $TDIR |
| 75 |
cd $TDIR |
cd $TDIR |
| 76 |
# cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm_verif_basic >& cvs_co.log |
# cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm_verif_basic > cvs_co.log 2>&1 |
| 77 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm >& cvs_co.log |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm > cvs_co.log 2>&1 |
| 78 |
|
if [ $status > 0 ]; then |
| 79 |
|
cat cvs_co.log |
| 80 |
|
fi |
| 81 |
|
else |
| 82 |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q update >> cvs_co.log 2>&1 |
| 83 |
if [ $status > 0 ]; then |
if [ $status > 0 ]; then |
| 84 |
cat cvs_co.log |
cat cvs_co.log |
| 85 |
fi |
fi |
| 92 |
# make sure that do use the cross compiler for testreport |
# make sure that do use the cross compiler for testreport |
| 93 |
#export CC=sxcc |
#export CC=sxcc |
| 94 |
|
|
| 95 |
$RUNTESTREPORT -j 8 -norun >> $MYOUTPUT 2>&1 |
$RUNTESTREPORT -j 8 -norun > $MYOUTPUT 2>&1 |
| 96 |
|
|
| 97 |
if [ $status > 0 ]; then |
if [ $status > 0 ] |
| 98 |
echo "something wrong with testreport" |
then |
| 99 |
echo "keeping the working directory" |
echo "something wrong with testreport" |
| 100 |
|
echo "keeping the working directory" |
| 101 |
#else |
#else |
| 102 |
# echo "check restarts" |
# echo "check restarts" |
| 103 |
# echo ../tools/do_tst_2+2 -mpi -exe \"$HERE/$RUNIT\" -a NONE |
# echo ../tools/do_tst_2+2 -mpi -exe \"$HERE/$RUNIT\" -a NONE |
| 106 |
# rm -rf $TDIR |
# rm -rf $TDIR |
| 107 |
fi |
fi |
| 108 |
|
|
| 109 |
echo "job script looks like this:" > $MYOUTPUT |
if [ ! -e $MYOUTPUT ] |
| 110 |
|
then |
| 111 |
|
touch $MYOUTPUT |
| 112 |
|
fi |
| 113 |
|
|
| 114 |
|
echo " " >> $MYOUTPUT |
| 115 |
|
echo "***********************************************************" >> $MYOUTPUT |
| 116 |
|
echo "Submitting this job script:" >> $MYOUTPUT |
| 117 |
|
echo "***********************************************************" >> $MYOUTPUT |
| 118 |
cat $HERE/$JOBSCRIPT >> $MYOUTPUT |
cat $HERE/$JOBSCRIPT >> $MYOUTPUT |
| 119 |
|
echo "***********************************************************" >> $MYOUTPUT |
| 120 |
echo "end of job script" >> $MYOUTPUT |
echo "end of job script" >> $MYOUTPUT |
| 121 |
|
echo "***********************************************************" >> $MYOUTPUT |
| 122 |
echo " " >> $MYOUTPUT |
echo " " >> $MYOUTPUT |
| 123 |
|
|
| 124 |
# now submit the job that actually runs all the experiments in one go |
# now submit the job that actually runs all the experiments in one go |
| 129 |
do |
do |
| 130 |
sleep 20 |
sleep 20 |
| 131 |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
| 132 |
|
echo "waiting for job ${jobruns%% *} ($JOBNAME) to complete" |
| 133 |
|
currentexp=`grep Experiment $MYOUTPUT | tail -1` |
| 134 |
|
echo "currently running $currentexp" |
| 135 |
done |
done |
| 136 |
|
|
| 137 |
# after running the experiments on the compute node run testreport |
# after running the experiments on the compute node run testreport |
| 138 |
# for a third time to evaluate results on the head node again |
# for a third time to evaluate results on the head node again |
| 139 |
#$RUNTESTREPORT -match 10 -runonly |
echo " " >> $MYOUTPUT |
| 140 |
|
echo "now run testreport for a final time to evaluate results:" >> $MYOUTPUT |
| 141 |
|
echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT |
| 142 |
|
#$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1 |
| 143 |
$RUNTESTREPORT -match 10 -runonly \ |
$RUNTESTREPORT -match 10 -runonly \ |
| 144 |
-a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1 |
-a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1 |
| 145 |
|
|