/[MITgcm]/mitgcm.org/front_content/make_summary
ViewVC logotype

Diff of /mitgcm.org/front_content/make_summary

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

revision 1.73 by jmc, Tue Sep 4 20:12:20 2012 UTC revision 1.78 by jmc, Thu Aug 22 21:32:54 2013 UTC
# Line 30  for ac_option ; do Line 30  for ac_option ; do
30    
31      # If the previous option needs an argument, assign it.      # If the previous option needs an argument, assign it.
32      if test -n "$ac_prev"; then      if test -n "$ac_prev"; then
33          eval "$ac_prev=\$ac_option"          eval "$ac_prev=\$ac_option"
34          ac_prev=          ac_prev=
35          continue          continue
36      fi      fi
37    
38      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`      ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Line 64  OUTDIR="/u/u0/httpd/html/testing/summary Line 64  OUTDIR="/u/u0/httpd/html/testing/summary
64  OUTFILE=$OUTDIR"/output_"$PERIOD".html"  OUTFILE=$OUTDIR"/output_"$PERIOD".html"
65  res_url="http://mitgcm.org/testing/"  res_url="http://mitgcm.org/testing/"
66    
67    #TMP=./mksum_$$
68    #- try to put temporary files in system-local /tmp dir
69    TMP=/tmp/mksum_$$
70    touch $TMP ; retVal=$?
71    if [ $retVal -eq 0 ] ; then
72      if test ! -r $TMP ; then TMP=./mksum_$$ ; fi
73    else
74      TMP=./mksum_$$
75    fi
76    rm -f $TMP
77    # echo "temp files: $TMP"
78    
79  #  Create the links in $OUTFILE :  #  Create the links in $OUTFILE :
80  echo "Creating the \"latest\" file for each machine: "  echo "Creating the \"latest\" file for each machine: "
81  the_date=`date`  the_date=`date`
# Line 85  EOF Line 97  EOF
97  color="#bbffdd"  color="#bbffdd"
98  ncolor="#bbddff"  ncolor="#bbddff"
99    
100  MACHINES="faulks meander aces- acesgrid baudelaire dickens danton beagle harbor"  MACHINES="aces- acesgrid baudelaire dickens danton beagle"
101  MACHINES="$MACHINES pleiades iblade rays solasrv sx8"  MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"
 MACHINES="$MACHINES trane dodongo dokdo stomp bigred"  
102    
103  ( 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
104    
105  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`
106  for madd in $MALL ; do  for madd in $MALL ; do
107      present=0      present=0
108      for m in $MACHINES ; do      for m in $MACHINES ; do
# Line 107  done Line 118  done
118  for mname in $MACHINES ; do  for mname in $MACHINES ; do
119    
120      echo "  $mname"      echo "  $mname"
     sname=`echo $mname | sed 's/-$//'`  
121    
122      dir_list=`grep $mname ./dir_all`      dir_list=`grep $mname $TMP.dir_all`
123      echo -n "" > ./mlist      echo -n "" > $TMP.mlist
124    
125      for i in $dir_list ; do      for i in $dir_list ; do
126    
# Line 137  for mname in $MACHINES ; do Line 147  for mname in $MACHINES ; do
147          fi          fi
148    
149          # EXTRA = non-standard list of experiment          # EXTRA = non-standard list of experiment
150          ADJOINT=          ADJOINT=0
151          TANGLIN=          TANGLIN=0
152            OPENAD=0
153          RESTART=0          RESTART=0
154          EXTRA=0          EXTRA=
155          FAST=0          FAST=0
156          DVLP=0          DVLP=0
157          MPI=0          MPI=0
158          MTH=0          MTH=0
159          UR4=0          UR4=0
160          if test -r $dir/summary.txt ; then          if test -r $dir/summary.txt ; then
161              comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`              ADJOINT=`grep -c -i '^ADJOINT' $dir/summary.txt`
162              eval $comm              if test "x$ADJOINT" = x1 ; then
163              comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null`                OPENAD=`grep -c '^Adjoint .* OpenAD' $dir/summary.txt`
164              eval $comm              fi
165                TANGLIN=`grep -c -i '^TANGLIN' $dir/summary.txt`
166                if test "x$TANGLIN" = x1 ; then
167                  OPENAD=`grep -c '^TangLin .* OpenAD' $dir/summary.txt`
168                fi
169              RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`              RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
170              comm=`grep '^run: .*testreport.* ' $dir/summary.txt`              comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
171              EXTRA=`echo "$comm" | grep -c " -*-tdir\>"`              EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
172              if test "x$EXTRA" = x0 ; then              if test "x$EXTRA" = x ; then
173                  EXTRA=`echo "$comm" | grep -c " -*-t\>"`                  EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"`
174                fi
175                if test "x$EXTRA" = x ; then EXTRA=0 ; else
176                    #echo -n "EXTRA=$EXTRA"
177                    nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w`
178                    nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"`
179                    nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"`
180                    EXTRA=1
181                    if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi
182                    if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi
183                    #echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2"
184              fi              fi
185              FAST=`echo "$comm" | grep -c " -*-fast\>"`              FAST=`echo "$comm" | grep -c " -*-fast\>"`
186              if test "x$FAST" = x0 ; then              if test "x$FAST" = x0 ; then
187                FAST=`echo "$comm" | grep -c " '*-noieee'*"`                  FAST=`echo "$comm" | grep -c " '*-noieee'*"`
188              fi              fi
189              DVLP=`echo "$comm" | grep -c " -*-devel\>"`              DVLP=`echo "$comm" | grep -c " -*-devel\>"`
190              MPI=`echo "$comm" | grep -c " -*-mpi\>"`              MPI=`echo "$comm" | grep -c " -*-mpi\>"`
191              if test "x$MPI" = x0 ; then              if test "x$MPI" = x0 ; then
192                 MPI=`echo "$comm" | grep -c " -*-MPI\>"`                  MPI=`echo "$comm" | grep -c " -*-MPI\>"`
193              fi              fi
194              MTH=`echo "$comm" | grep -c " -*-mth\>"`              MTH=`echo "$comm" | grep -c " -*-mth\>"`
195              UR4=`echo "$comm" | grep -c " -*-use_r4\>"`              UR4=`echo "$comm" | grep -c " -*-use_r4\>"`
196              if test "x$UR4" = x0 ; then              if test "x$UR4" = x0 ; then
197                 UR4=`echo "$comm" | grep -c " -*-ur4\>"`                  UR4=`echo "$comm" | grep -c " -*-ur4\>"`
198              fi              fi
199          fi          fi
200          if test "x$ADJOINT" = xtrue ; then          if test "x$ADJOINT" = x1 ; then
201              kind="adjoint" ; order=0              kind="adjoint-taf" ; order=0
202          elif test "x$TANGLIN" = xtrue ; then            if test "x$OPENAD" = x1 ; then
203              kind="tanglin" ; order=1              kind="adjoint-oad" ; order=2
204              fi
205            elif test "x$TANGLIN" = x1 ; then
206                kind="tanglin-taf" ; order=1
207              if test "x$OPENAD" = x1 ; then
208                kind="tanglin-oad" ; order=3
209              fi
210          elif test "x$RESTART" = x0 ; then          elif test "x$RESTART" = x0 ; then
211              kind="forward" ; order=2              kind="forward" ; order=4
212          else          else
213              kind="restart" ; order=3              kind="restart" ; order=5
         fi  
         if test "x$EXTRA" != x0 ; then  
             order=`expr $order + 4`  
214          fi          fi
215            order=`expr $order + 10 \* $EXTRA`
216          order=`printf '%3.3i' $order`          order=`printf '%3.3i' $order`
217          if test "x$UR4" = x1 ; then          if test "x$UR4" = x1 ; then
218              OPTFILE="${OPTFILE}.use_r4"              OPTFILE="${OPTFILE}.use_r4"
# Line 221  for mname in $MACHINES ; do Line 250  for mname in $MACHINES ; do
250          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")'`
251          rm -f ./ms_tmp          rm -f ./ms_tmp
252    
253          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
254    
255      done      done
256    
257      # helpful for debugging      # helpful for debugging
258      # cat ./mlist      # cat $TMP.mlist
259    
260      #  Do we have any data?  If so, create the latest pointer.      #  Do we have any data?  If so, create the latest pointer.
261      num=`wc -l ./mlist | awk '{print $1}'`      num=`wc -l $TMP.mlist | awk '{print $1}'`
262      if test $num -gt 0 ; then      if test $num -gt 0 ; then
263    
264          # swap colors          # swap colors
# Line 237  for mname in $MACHINES ; do Line 266  for mname in $MACHINES ; do
266          color=$ncolor          color=$ncolor
267          ncolor=$ctmp          ncolor=$ctmp
268    
269          keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`          keys=`cat $TMP.mlist | cut -d " " -f 1 | sort | uniq`
270    
271          for key in $keys ; do          for key in $keys ; do
272              tline=`grep "^$key " ./mlist | head -1`              tline=`grep "^$key " $TMP.mlist | head -1`
273              ratio=`echo $tline | cut -d " " -f 6`              ratio=`echo $tline | cut -d " " -f 6`
274              ldir=`echo $tline | cut -d " " -f 5`              ldir=`echo $tline | cut -d " " -f 5`
275              kind=`echo $tline | cut -d " " -f 4`              kind=`echo $tline | cut -d " " -f 4`
276              optf=`echo $tline | cut -d " " -f 3`              optf=`echo $tline | cut -d " " -f 3`
277              DAY=`echo $tline | cut -d " " -f 2`              DAY=`echo $tline | cut -d " " -f 2`
278              URL="results/$PERIOD/$ldir"              URL="results/$PERIOD/$ldir"
279                #-- machine name to print:
280                sname=`echo $mname | sed 's/-$//'`
281                alt=`echo $key | sed "s/$optf//"`
282               #if   [ $alt -ge 30 ] ; then sname="${sname}.darwin"
283               #elif [ $alt -ge 20 ] ; then sname="${sname}.monod" ; fi
284              cat <<EOF >>$OUTFILE              cat <<EOF >>$OUTFILE
285  <tr bgcolor="$color">  <tr bgcolor="$color">
286    <td height="0"> $sname </td>    <td height="0"> $sname </td>
# Line 279  MITgcm/tools/example_scripts</a>.</p> Line 313  MITgcm/tools/example_scripts</a>.</p>
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

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.78

  ViewVC Help
Powered by ViewVC 1.1.22