--- mitgcm.org/scripts/check_outp 2011/06/29 14:00:59 1.28 +++ mitgcm.org/scripts/check_outp 2012/09/04 20:34:31 1.33 @@ -1,12 +1,11 @@ #! /usr/bin/env bash -# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.28 2011/06/29 14:00:59 jmc Exp $ +# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/scripts/check_outp,v 1.33 2012/09/04 20:34:31 jmc Exp $ # # The purpose of this script is to compare # the latest output with the previous one (from the same platform with # same optfile) - usage() { echo @@ -101,26 +100,59 @@ fi ADJOINT= + TANGLIN= RESTART=0 + EXTRA=0 FAST=0 DVLP=0 + MPI=0 MTH=0 + UR4=0 if test -r $dir/summary.txt ; then comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null` eval $comm + comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null` + eval $comm RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` - FAST=`grep -c "^run: .*testreport.* '*-fast'*" $dir/summary.txt` + comm=`grep '^run: .*testreport.* ' $dir/summary.txt` + EXTRA=`echo "$comm" | grep -c " -*-tdir\>"` + if test "x$EXTRA" = x0 ; then + EXTRA=`echo "$comm" | grep -c " -*-t\>"` + fi + FAST=`echo "$comm" | grep -c " -*-fast\>"` if test "x$FAST" = x0 ; then - FAST=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt` + FAST=`echo "$comm" | grep -c " '*-noieee'*"` + fi + DVLP=`echo "$comm" | grep -c " -*-devel\>"` + MPI=`echo "$comm" | grep -c " -*-mpi\>"` + if test "x$MPI" = x0 ; then + MPI=`echo "$comm" | grep -c " -*-MPI\>"` + fi + MTH=`echo "$comm" | grep -c " -*-mth\>"` + UR4=`echo "$comm" | grep -c " -*-use_r4\>"` + if test "x$UR4" = x0 ; then + UR4=`echo "$comm" | grep -c " -*-ur4\>"` fi - DVLP=`grep -c "^run: .*testreport.* '*-devel'*" $dir/summary.txt` - MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt` fi - if test "x$RESTART" = x0 ; then - kind="forward" - test "x$ADJOINT" = xtrue && kind="adjoint" + if test "x$ADJOINT" = xtrue ; then + kind="adjoint" ; order=0 + elif test "x$TANGLIN" = xtrue ; then + kind="tanglin" ; order=1 + elif test "x$RESTART" = x0 ; then + kind="forward" ; order=2 else - kind="restart" + kind="restart" ; order=3 + fi + if test "x$EXTRA" != x0 ; then + order=`expr $order + 4` + fi + order=`printf '%3.3i' $order` + if test "x$UR4" = x1 ; then + OPTFILE="${OPTFILE}.use_r4" + fi + if test "x$MPI" = x1 ; then + yy=`echo $OPTFILE | grep -c '+mpi'` + if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi fi if test "x$MTH" = x1 ; then yy=`echo $OPTFILE | grep -c '+mth$'` @@ -136,10 +168,10 @@ ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'` day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'` - if [ $day -lt $BEFORE ] ; then - echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist + if [ $day -lt $BEFORE ] ; then + echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./plist elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then - echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist + echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./slist else if test $dBug = 't' ; then echo "discard day='$day' from: $i" | tee -a $OUTPFIL @@ -185,9 +217,9 @@ # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then - eval "$ac_prev=\$ac_option" - ac_prev= - continue + eval "$ac_prev=\$ac_option" + ac_prev= + continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` @@ -304,7 +336,7 @@ ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all if test "x$MACHINES" = "x_All_" ; then - MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor" + MACHINES="faulks meander aces- acesgrid baudelaire dickens danton beagle harbor" MACHINES="$MACHINES pleiades iblade rays solasrv sx8" MACHINES="$MACHINES trane dodongo dokdo stomp bigred" @@ -325,6 +357,7 @@ for pname in $MACHINES ; do + sname=`echo $pname | sed 's/-$//'` mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'` sUser= if test $mname != $pname ; then @@ -370,7 +403,7 @@ #if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi #if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi dd=`echo $optf | grep -c 'bigred.*noieee'` - if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi + #if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi if test $num -lt 0 ; then echo " discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL cmis=`expr $cmis + 1` @@ -451,7 +484,7 @@ fi done if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi - printf '%11s : %3i %4s %3i ' $pname $ctot $tmis $cdif >> $OUTPSUM + printf '%11s : %3i %4s %3i ' $sname $ctot $tmis $cdif >> $OUTPSUM if [ $cdif -gt 0 ] ; then echo " $clin" >> $OUTPSUM else echo "" >> $OUTPSUM ; fi