/[MITgcm]/mitgcm.org/scripts/check_outp
ViewVC logotype

Diff of /mitgcm.org/scripts/check_outp

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.27 by jmc, Fri Jan 21 19:45:01 2011 UTC revision 1.35 by jmc, Sun Feb 24 15:29:05 2013 UTC
# Line 6  Line 6 
6  #  the latest output with the previous one (from the same platform with  #  the latest output with the previous one (from the same platform with
7  #    same optfile)  #    same optfile)
8    
   
9  usage()  usage()
10  {  {
11      echo      echo
# Line 101  make_resdir_list() Line 100  make_resdir_list()
100              fi              fi
101    
102              ADJOINT=              ADJOINT=
103                TANGLIN=
104              RESTART=0              RESTART=0
105              NOI3E=0              EXTRA=
106                FAST=0
107                DVLP=0
108                MPI=0
109              MTH=0              MTH=0
110                UR4=0
111              if test -r $dir/summary.txt ; then              if test -r $dir/summary.txt ; then
112                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`                  comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
113                  eval $comm                  eval $comm
114                    comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null`
115                    eval $comm
116                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`                  RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
117                  NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`                  comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
118                  MTH=`grep -c "^run: .*testreport.* -mth" $dir/summary.txt`                  EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
119                    if test "x$EXTRA" = x ; then
120                        EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"`
121                    fi
122                    if test "x$EXTRA" = x ; then EXTRA=0 ; else
123                        #echo -n "EXTRA=$EXTRA"
124                        nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w`
125                        nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"`
126                        nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"`
127                        EXTRA=1
128                        if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi
129                        if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi
130                        #echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2"
131                    fi
132                    FAST=`echo "$comm" | grep -c " -*-fast\>"`
133                    if test "x$FAST" = x0 ; then
134                       FAST=`echo "$comm" | grep -c " '*-noieee'*"`
135                    fi
136                    DVLP=`echo "$comm" | grep -c " -*-devel\>"`
137                    MPI=`echo "$comm" | grep -c " -*-mpi\>"`
138                    if test "x$MPI" = x0 ; then
139                       MPI=`echo "$comm" | grep -c " -*-MPI\>"`
140                    fi
141                    MTH=`echo "$comm" | grep -c " -*-mth\>"`
142                    UR4=`echo "$comm" | grep -c " -*-use_r4\>"`
143                    if test "x$UR4" = x0 ; then
144                       UR4=`echo "$comm" | grep -c " -*-ur4\>"`
145                    fi
146              fi              fi
147              if test "x$RESTART" = x0 ; then              if test "x$ADJOINT" = xtrue ; then
148                  kind="forward"                  kind="adjoint" ; order=0
149                  test "x$ADJOINT" = xtrue  &&  kind="adjoint"              elif test "x$TANGLIN" = xtrue ; then
150                    kind="tanglin" ; order=1
151                elif test "x$RESTART" = x0 ; then
152                    kind="forward" ; order=2
153              else              else
154                  kind="restart"                  kind="restart" ; order=3
155                fi
156                order=`expr $order + 10 \* $EXTRA`
157                order=`printf '%3.3i' $order`
158                if test "x$UR4" = x1 ; then
159                    OPTFILE="${OPTFILE}.use_r4"
160                fi
161                if test "x$MPI" = x1 ; then
162                    yy=`echo $OPTFILE | grep -c '+mpi'`
163                    if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi
164              fi              fi
165              if test "x$MTH" = x1 ; then              if test "x$MTH" = x1 ; then
166                  yy=`echo $OPTFILE | grep -c '+mth$'`                  yy=`echo $OPTFILE | grep -c '+mth$'`
167                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi                  if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
168              fi              fi
169              if test "x$NOI3E" = x1 ; then              if test "x$FAST" = x1 ; then
170                  OPTFILE="${OPTFILE}.noieee"                  OPTFILE="${OPTFILE}.fast"
171                fi
172                if test "x$DVLP" = x1 ; then
173                    OPTFILE="${OPTFILE}.dvlp"
174              fi              fi
175              day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`              day=`echo $i   | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
176              ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`              ttt=`echo $day | sed -e 's/_[0-9]$//' | sed -e 's/_[0-9][0-9]$//'`
177              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`              day=`echo $ttt | sed -e 's|_| |g' |awk '{print $NF}'`
178    
179              if [ $day -lt $BEFORE ] ; then              if [ $day -lt $BEFORE ] ; then
180                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./plist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./plist
181              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then              elif [ $day -ge $FIRSTDAY -a $day -le $LASTDAY ] ; then
182                  echo "$OPTFILE$kind $day $OPTFILE $kind $i" >> ./slist                  echo "$OPTFILE$order $day $OPTFILE $kind $i" >> ./slist
183              else              else
184                  if test $dBug = 't' ; then                  if test $dBug = 't' ; then
185                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL                     echo "discard day='$day' from: $i" | tee -a $OUTPFIL
# Line 177  for ac_option ; do Line 225  for ac_option ; do
225    
226      # If the previous option needs an argument, assign it.      # If the previous option needs an argument, assign it.
227      if test -n "$ac_prev"; then      if test -n "$ac_prev"; then
228          eval "$ac_prev=\$ac_option"          eval "$ac_prev=\$ac_option"
229          ac_prev=          ac_prev=
230          continue          continue
231      fi      fi
232    
233      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Line 296  echo "     name     checked   comp    Di Line 344  echo "     name     checked   comp    Di
344  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all  ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all
345    
346  if test "x$MACHINES" = "x_All_" ; then  if test "x$MACHINES" = "x_All_" ; then
347    MACHINES="faulks meander aces.jmc aces.ce107 baudelaire dickens danton beagle harbor"    MACHINES="aces- acesgrid baudelaire dickens danton beagle"
348    MACHINES="$MACHINES pleiades iblade rays solasrv sx8"    MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"
   MACHINES="$MACHINES trane dodongo dokdo stomp bigred"  
349    
350    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`    MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
351    for madd in $MALL ; do    for madd in $MALL ; do
# Line 317  fi Line 364  fi
364    
365  for pname in $MACHINES ; do  for pname in $MACHINES ; do
366    
367        sname=`echo $pname | sed 's/-$//'`
368      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`      mname=`echo $pname | sed 's/\./ /g' | awk '{print $1}'`
369      sUser=      sUser=
370      if test $mname != $pname ; then      if test $mname != $pname ; then
# Line 362  for pname in $MACHINES ; do Line 410  for pname in $MACHINES ; do
410            #if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi            #if test $mname = 'aces' -a $optf = 'linux_ia32_open64' ; then num=-1 ; fi
411            #if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi            #if test $mname = 'aces' -a $optf = 'linux_ia32_g95' ; then num=-1 ; fi
412            dd=`echo $optf | grep -c 'bigred.*noieee'`            dd=`echo $optf | grep -c 'bigred.*noieee'`
413            if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi            #if test $mname = 'bigred' -a $dd = 1 ; then num=-1 ; fi
414            if test $num -lt 0 ; then            if test $num -lt 0 ; then
415              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL              echo "  discard $sdir : $type , of='$optf'" | tee -a $OUTPFIL
416              cmis=`expr $cmis + 1`              cmis=`expr $cmis + 1`
# Line 443  for pname in $MACHINES ; do Line 491  for pname in $MACHINES ; do
491            fi            fi
492          done          done
493          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi          if [ $cmis -gt 0 ] ; then tmis='(-'$cmis')' ; else tmis='(--)' ; fi
494          printf '%11s :  %3i      %4s   %3i  ' $pname $ctot $tmis $cdif >> $OUTPSUM          printf '%11s :  %3i      %4s   %3i  ' $sname $ctot $tmis $cdif >> $OUTPSUM
495          if [ $cdif -gt 0 ] ; then          if [ $cdif -gt 0 ] ; then
496            echo "   $clin" >> $OUTPSUM            echo "   $clin" >> $OUTPSUM
497          else echo "" >> $OUTPSUM ; fi          else echo "" >> $OUTPSUM ; fi

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.35

  ViewVC Help
Powered by ViewVC 1.1.22