| 5 |
# The purpose of this script is to create HTML summaries of the |
# The purpose of this script is to create HTML summaries of the |
| 6 |
# directories produced by the "parse_emails" script. |
# directories produced by the "parse_emails" script. |
| 7 |
|
|
|
|
|
| 8 |
usage() |
usage() |
| 9 |
{ |
{ |
| 10 |
echo |
echo |
| 63 |
OUTFILE=$OUTDIR"/output_"$PERIOD".html" |
OUTFILE=$OUTDIR"/output_"$PERIOD".html" |
| 64 |
res_url="http://mitgcm.org/testing/" |
res_url="http://mitgcm.org/testing/" |
| 65 |
|
|
| 66 |
|
#TMP=./mksum_$$ |
| 67 |
|
#- try to put temporary files in system-local /tmp dir |
| 68 |
|
TMP=/tmp/mksum_$$ |
| 69 |
|
touch $TMP ; retVal=$? |
| 70 |
|
if [ $retVal -eq 0 ] ; then |
| 71 |
|
if test ! -r $TMP ; then TMP=./mksum_$$ ; fi |
| 72 |
|
else |
| 73 |
|
TMP=./mksum_$$ |
| 74 |
|
fi |
| 75 |
|
rm -f $TMP |
| 76 |
|
# echo "temp files: $TMP" |
| 77 |
|
|
| 78 |
# Create the links in $OUTFILE : |
# Create the links in $OUTFILE : |
| 79 |
echo "Creating the \"latest\" file for each machine: " |
echo "Creating the \"latest\" file for each machine: " |
| 80 |
the_date=`date` |
the_date=`date` |
| 96 |
color="#bbffdd" |
color="#bbffdd" |
| 97 |
ncolor="#bbddff" |
ncolor="#bbddff" |
| 98 |
|
|
| 99 |
MACHINES="aces- acesgrid baudelaire dickens danton beagle" |
MACHINES="aces- acesgrid baudelaire engaging svante glacier uv100 ollie stan1" |
| 100 |
MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber" |
MACHINES="$MACHINES pleiades archer stomp octopus saramago" |
| 101 |
|
|
| 102 |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all |
( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > $TMP.dir_all |
| 103 |
|
|
| 104 |
MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
MALL=`cat $TMP.dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` |
| 105 |
for madd in $MALL ; do |
for madd in $MALL ; do |
| 106 |
present=0 |
present=0 |
| 107 |
for m in $MACHINES ; do |
for m in $MACHINES ; do |
| 118 |
|
|
| 119 |
echo " $mname" |
echo " $mname" |
| 120 |
|
|
| 121 |
dir_list=`grep $mname ./dir_all` |
dir_list=`grep $mname $TMP.dir_all` |
| 122 |
echo -n "" > ./mlist |
echo -n "" > $TMP.mlist |
| 123 |
|
|
| 124 |
for i in $dir_list ; do |
for i in $dir_list ; do |
| 125 |
|
|
| 146 |
fi |
fi |
| 147 |
|
|
| 148 |
# EXTRA = non-standard list of experiment |
# EXTRA = non-standard list of experiment |
| 149 |
ADJOINT= |
ADJOINT=0 |
| 150 |
TANGLIN= |
TANGLIN=0 |
| 151 |
|
OPENAD=0 |
| 152 |
RESTART=0 |
RESTART=0 |
| 153 |
EXTRA= |
EXTRA= |
| 154 |
FAST=0 |
FAST=0 |
| 157 |
MTH=0 |
MTH=0 |
| 158 |
UR4=0 |
UR4=0 |
| 159 |
if test -r $dir/summary.txt ; then |
if test -r $dir/summary.txt ; then |
| 160 |
comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null` |
ADJOINT=`grep -c -i '^ADJOINT' $dir/summary.txt` |
| 161 |
eval $comm |
if test "x$ADJOINT" = x1 ; then |
| 162 |
comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null` |
OPENAD=`grep -c '^Adjoint .* OpenAD' $dir/summary.txt` |
| 163 |
eval $comm |
fi |
| 164 |
|
TANGLIN=`grep -c -i '^TANGLIN' $dir/summary.txt` |
| 165 |
|
if test "x$TANGLIN" = x1 ; then |
| 166 |
|
OPENAD=`grep -c '^TangLin .* OpenAD' $dir/summary.txt` |
| 167 |
|
fi |
| 168 |
RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` |
RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` |
| 169 |
comm=`grep '^run: .*testreport.* ' $dir/summary.txt` |
comm=`grep '^run: .*testreport.* ' $dir/summary.txt` |
| 170 |
EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"` |
EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"` |
| 196 |
UR4=`echo "$comm" | grep -c " -*-ur4\>"` |
UR4=`echo "$comm" | grep -c " -*-ur4\>"` |
| 197 |
fi |
fi |
| 198 |
fi |
fi |
| 199 |
if test "x$ADJOINT" = xtrue ; then |
if test "x$ADJOINT" = x1 ; then |
| 200 |
kind="adjoint" ; order=0 |
kind="adjoint-taf" ; order=0 |
| 201 |
elif test "x$TANGLIN" = xtrue ; then |
if test "x$OPENAD" = x1 ; then |
| 202 |
kind="tanglin" ; order=1 |
kind="adjoint-oad" ; order=2 |
| 203 |
|
fi |
| 204 |
|
elif test "x$TANGLIN" = x1 ; then |
| 205 |
|
kind="tanglin-taf" ; order=1 |
| 206 |
|
if test "x$OPENAD" = x1 ; then |
| 207 |
|
kind="tanglin-oad" ; order=3 |
| 208 |
|
fi |
| 209 |
elif test "x$RESTART" = x0 ; then |
elif test "x$RESTART" = x0 ; then |
| 210 |
kind="forward" ; order=2 |
kind="forward" ; order=4 |
| 211 |
else |
else |
| 212 |
kind="restart" ; order=3 |
kind="restart" ; order=5 |
| 213 |
fi |
fi |
|
order=`expr $order + 10 \* $EXTRA` |
|
|
order=`printf '%3.3i' $order` |
|
| 214 |
if test "x$UR4" = x1 ; then |
if test "x$UR4" = x1 ; then |
| 215 |
OPTFILE="${OPTFILE}.use_r4" |
OPTFILE="${OPTFILE}.use_r4" |
| 216 |
fi |
fi |
| 217 |
if test "x$MPI" = x1 ; then |
if test "x$MPI" = x1 ; then |
| 218 |
yy=`echo $OPTFILE | grep -c '+mpi'` |
yy=`echo $OPTFILE | grep -c '+mpi'` |
| 219 |
if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi |
if test $yy = 0 ; then yy=`echo $OPTFILE | grep -c '+impi'` ; fi |
| 220 |
|
if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" |
| 221 |
|
else order=`expr $order + 200` ; fi |
| 222 |
fi |
fi |
| 223 |
if test "x$MTH" = x1 ; then |
if test "x$MTH" = x1 ; then |
| 224 |
yy=`echo $OPTFILE | grep -c '+mth$'` |
yy=`echo $OPTFILE | grep -c '+mth$'` |
| 230 |
if test "x$DVLP" = x1 ; then |
if test "x$DVLP" = x1 ; then |
| 231 |
OPTFILE="${OPTFILE}.dvlp" |
OPTFILE="${OPTFILE}.dvlp" |
| 232 |
fi |
fi |
| 233 |
|
order=`expr $order + 10 \* $EXTRA` |
| 234 |
|
order=`printf '%3.3i' $order` |
| 235 |
|
|
| 236 |
t_pass="--" |
t_pass="--" |
| 237 |
t_tot="--" |
t_tot="--" |
| 251 |
DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,2)=="20")'` |
DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,2)=="20")'` |
| 252 |
rm -f ./ms_tmp |
rm -f ./ms_tmp |
| 253 |
|
|
| 254 |
echo "$OPTFILE$order $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist |
echo "$OPTFILE$order $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> $TMP.mlist |
| 255 |
|
|
| 256 |
done |
done |
| 257 |
|
|
| 258 |
# helpful for debugging |
# helpful for debugging |
| 259 |
# cat ./mlist |
# cat $TMP.mlist |
| 260 |
|
|
| 261 |
# Do we have any data? If so, create the latest pointer. |
# Do we have any data? If so, create the latest pointer. |
| 262 |
num=`wc -l ./mlist | awk '{print $1}'` |
num=`wc -l $TMP.mlist | awk '{print $1}'` |
| 263 |
if test $num -gt 0 ; then |
if test $num -gt 0 ; then |
| 264 |
|
|
| 265 |
# swap colors |
# swap colors |
| 267 |
color=$ncolor |
color=$ncolor |
| 268 |
ncolor=$ctmp |
ncolor=$ctmp |
| 269 |
|
|
| 270 |
keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq` |
keys=`cat $TMP.mlist | cut -d " " -f 1 | sort | uniq` |
| 271 |
|
|
| 272 |
for key in $keys ; do |
for key in $keys ; do |
| 273 |
tline=`grep "^$key " ./mlist | head -1` |
tline=`grep "^$key " $TMP.mlist | head -1` |
| 274 |
ratio=`echo $tline | cut -d " " -f 6` |
ratio=`echo $tline | cut -d " " -f 6` |
| 275 |
ldir=`echo $tline | cut -d " " -f 5` |
ldir=`echo $tline | cut -d " " -f 5` |
| 276 |
kind=`echo $tline | cut -d " " -f 4` |
kind=`echo $tline | cut -d " " -f 4` |
| 308 |
href="http://mitgcm.org/viewvc/MITgcm/MITgcm/tools/example_scripts/"> |
href="http://mitgcm.org/viewvc/MITgcm/MITgcm/tools/example_scripts/"> |
| 309 |
MITgcm/tools/example_scripts</a>.</p> |
MITgcm/tools/example_scripts</a>.</p> |
| 310 |
|
|
|
|
|
| 311 |
</body> |
</body> |
| 312 |
</html> |
</html> |
| 313 |
|
|
| 314 |
EOF |
EOF |
| 315 |
|
|
| 316 |
rm -f ./dir_all ./mlist |
rm -f $TMP.dir_all $TMP.mlist |
| 317 |
|
|
| 318 |
#- put the file in place |
#- put the file in place |
| 319 |
chgrp gcmpack $OUTFILE |
chgrp gcmpack $OUTFILE |