| 51 |
selectexperiment='-t exp2' |
selectexperiment='-t exp2' |
| 52 |
selectexperiment='' |
selectexperiment='' |
| 53 |
# download code into this directory |
# download code into this directory |
| 54 |
TDIR=/ace/scr/mlosch/tmp_$VENDOR |
TDIR=/ace/user/mlosch/tmp_$VENDOR |
| 55 |
|
gcmDIR=MITgcm |
| 56 |
|
git_repo='MITgcm' |
| 57 |
|
git_code='MITgcm' |
| 58 |
|
|
| 59 |
OPTFILE=../tools/build_options/SUPER-UX_SX-ACE_sxf90_awi |
OPTFILE=../tools/build_options/SUPER-UX_SX-ACE_sxf90_awi |
| 60 |
OPTFILE=/home/ace/mlosch/MITgcm/tools/build_options/SUPER-UX_SX-ACE_sxf90_awi |
#OPTFILE=/home/ace/mlosch/MITgcm/tools/build_options/SUPER-UX_SX-ACE_sxf90_awi |
| 61 |
|
|
| 62 |
RUNTESTREPORT="./testreport $MPI -of=${OPTFILE} $selectexperiment -small_f" |
RUNTESTREPORT="./testreport $MPI -of=${OPTFILE} $selectexperiment -small_f" |
| 63 |
# |
# |
| 64 |
# create batch script |
# create batch script |
| 65 |
# |
# |
| 66 |
cat << EOF > $HERE/$JOBSCRIPT |
cat << EOF > $HERE/$JOBSCRIPT |
| 67 |
###PBS -q ace-test # job queue not neccesary so far |
#PBS -q ace-r # job queue |
| 68 |
#PBS -N $JOBNAME # give the job a name |
#PBS -N $JOBNAME # give the job a name |
| 69 |
#PBS -l cpunum_job=$NPROCS # cpus per node |
#PBS -l cpunum_job=$NPROCS # cpus per node |
| 70 |
|
#PBS -l elapstim_req=2:00:00 |
| 71 |
#PBS -l cputim_job=2:00:00 # time limit |
#PBS -l cputim_job=2:00:00 # time limit |
| 72 |
#PBS -l memsz_job=32gb # max accumulated memory, we need this much because of many netcdf files |
#PBS -l memsz_job=32gb # max accumulated memory, we need this much because of many netcdf files |
| 73 |
#PBS -j o # join i/o |
#PBS -j o # join i/o |
| 87 |
if [ -e $OUTFILE ]; then |
if [ -e $OUTFILE ]; then |
| 88 |
rm -r $OUTFILE |
rm -r $OUTFILE |
| 89 |
fi |
fi |
| 90 |
if [ -e $TDIR/MITgcm ]; then |
|
| 91 |
# if availabe just update |
# checkOut determines how much checking out is being done |
| 92 |
cd $TDIR/MITgcm |
# checkOut = 3: new clone from GitHub and make a new copy |
| 93 |
cvs -q update -d -P >> cvs_co.log 2>&1 |
# checkOut = 2: update (git pull) existing repo and make a new copy |
| 94 |
if [ "$?" != "0" ]; then |
# checkOut = 1: skip update |
| 95 |
cat cvs_co.log |
# checkOut = 0: use existing test code (if available otherwise switch to 1) |
| 96 |
|
|
| 97 |
|
checkOut=2 |
| 98 |
|
|
| 99 |
|
tmpFil=$TDIR/error.out |
| 100 |
|
if [ $checkOut -le 1 ] ; then |
| 101 |
|
if test -e $TDIR/${gcmDIR}/doc ; then |
| 102 |
|
echo $TDIR/${gcmDIR}/doc 'exist' |
| 103 |
|
else |
| 104 |
|
echo -n $TDIR/${gcmDIR} 'missing ; ' |
| 105 |
|
checkOut=2 |
| 106 |
|
echo "will make a new copy ( checkOut=$checkOut )" |
| 107 |
|
fi |
| 108 |
|
fi |
| 109 |
|
|
| 110 |
|
if [ $checkOut -ge 2 ] ; then |
| 111 |
|
#---- cleaning: |
| 112 |
|
cd $TDIR |
| 113 |
|
|
| 114 |
|
#---- Make a new clone or update existing one: |
| 115 |
|
if test -e ${gcmDIR}/.git/config ; then |
| 116 |
|
echo "${gcmDIR}/.git/config exist" |
| 117 |
|
else |
| 118 |
|
echo -n "${gcmDIR}/.git/config 'missing, " |
| 119 |
|
checkOut=3 |
| 120 |
|
echo "will get new clone ( checkOut=$checkOut )" |
| 121 |
|
fi |
| 122 |
|
if [ $checkOut -eq 3 ] ; then |
| 123 |
|
echo -n "Removing old clone: $TDIR/${gcmDIR} ..." |
| 124 |
|
test -e $TDIR/${gcmDIR} && rm -rf $TDIR/${gcmDIR} |
| 125 |
|
echo " done" |
| 126 |
|
echo -n "Make a new clone of $git_code from repo: $git_repo ..." |
| 127 |
|
git clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil |
| 128 |
|
retVal=$? |
| 129 |
|
if test $retVal = 0 ; then |
| 130 |
|
echo ' --> done!' |
| 131 |
|
rm -f $tmpFil |
| 132 |
|
else |
| 133 |
|
echo " Error: 'git clone' returned: $retVal" |
| 134 |
|
cat $tmpFil |
| 135 |
|
rm -f $tmpFil |
| 136 |
|
exit 2 |
| 137 |
fi |
fi |
| 138 |
|
else |
| 139 |
|
echo "Updating current clone ( $git_code ) ..." |
| 140 |
|
( cd ${gcmDIR}; git checkout master ; git pull ) |
| 141 |
|
echo ' --> done!' |
| 142 |
|
fi |
| 143 |
else |
else |
| 144 |
# create directory and download code |
cd $TDIR |
|
if [ -e $TDIR ]; then |
|
|
rm -rf $TDIR |
|
|
fi |
|
|
mkdir $TDIR |
|
|
cd $TDIR |
|
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm > cvs_co.log 2>&1 |
|
|
if [ "$?" != "0" ]; then |
|
|
cat cvs_co.log |
|
|
fi |
|
| 145 |
fi |
fi |
| 146 |
|
|
| 147 |
cd $TDIR/MITgcm/verification |
cd $TDIR/MITgcm/verification |
| 181 |
echo " " >> $MYOUTPUT |
echo " " >> $MYOUTPUT |
| 182 |
|
|
| 183 |
# 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 |
| 184 |
|
echo "qsub $HERE/$JOBSCRIPT" |
| 185 |
qsub $HERE/$JOBSCRIPT |
qsub $HERE/$JOBSCRIPT |
| 186 |
# 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 |
| 187 |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
jobruns=`qstat -n -u mlosch | grep "$JOBNAME"` |
| 201 |
echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT |
echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT |
| 202 |
#$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1 |
#$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1 |
| 203 |
$RUNTESTREPORT -match 10 -runonly \ |
$RUNTESTREPORT -match 10 -runonly \ |
| 204 |
-a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1 |
-a "jm_c@mitgcm.org" >> $MYOUTPUT 2>&1 |
| 205 |
|
# -a "jm_c@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1 |
| 206 |
|
|
| 207 |
echo "end of mitgcmtestreport" |
echo "end of mitgcmtestreport" |