/[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.61 by jmc, Tue Mar 2 19:26:10 2010 UTC revision 1.76 by jmc, Sun Feb 24 15:27:58 2013 UTC
# Line 10  usage() Line 10  usage()
10  {  {
11      echo      echo
12      echo "Usage:  $0 [OPTIONS]"      echo "Usage:  $0 [OPTIONS]"
13      echo      echo
14      echo "where possible OPTIONS are:"      echo "where possible OPTIONS are:"
15      echo "  (-help|-h)           print usage"      echo "  (-help|-h)           print usage"
16      echo "  (-date |-d )PERIOD   run for PERIOD=\"YYYY_MM\""      echo "  (-date |-d )PERIOD   run for PERIOD=\"YYYY_MM\""
17      echo "                         [def=\"$PERIOD\"]"      echo "                         [def=\"$PERIOD\"]"
18      echo      echo
19      exit 1      exit 1
20  }  }
21    
# 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[^=]*=\(.*\)'`
39    
40      case $ac_option in      case $ac_option in
41            
42          -help | --help | -h | --h)          -help | --help | -h | --h)
43              usage ;;              usage ;;
           
         -date | --date | -d | --d)  
             ac_prev=PERIOD ;;  
         --date=* | -date=*)  
             PERIOD=$ac_optarg ;;  
44    
45          *)          -date | --date | -d | --d)
46                ac_prev=PERIOD ;;
47            --date=* | -date=*)
48                PERIOD=$ac_optarg ;;
49    
50            *)
51              echo "Error: don't understand argument \"$ac_option\""              echo "Error: don't understand argument \"$ac_option\""
52              usage              usage
53              ;;              ;;
54    
55       esac       esac
56    
# Line 85  EOF Line 85  EOF
85  color="#bbffdd"  color="#bbffdd"
86  ncolor="#bbddff"  ncolor="#bbddff"
87    
88  MACHINES="faulks meander lagoon harbor dickens danton aces"  MACHINES="aces- acesgrid baudelaire dickens danton beagle"
89  MACHINES="$MACHINES beagle columbia pleiades iblade rays solssrv solasrv sx8"  MACHINES="$MACHINES pleiades iblade sx8 uv100 solasrv stomp weber"
 MACHINES="$MACHINES bigred starp"  
90    
91  ( 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
92    
# Line 95  MALL=`cat ./dir_all | sed -e 's|_| |g' | Line 94  MALL=`cat ./dir_all | sed -e 's|_| |g' |
94  for madd in $MALL ; do  for madd in $MALL ; do
95      present=0      present=0
96      for m in $MACHINES ; do      for m in $MACHINES ; do
97          echo $madd | grep $m > /dev/null 2>&1          echo $madd | grep $m > /dev/null 2>&1
98          RETVAL=$?          RETVAL=$?
99          test $RETVAL = 0  &&  present=1          test $RETVAL = 0  &&  present=1
100          continue          continue
101      done      done
102      test $present = 0  &&  MACHINES="$MACHINES $madd"      test $present = 0  &&  MACHINES="$MACHINES $madd"
103  done  done
104  #MACHINES="faulks"  #MACHINES="baudelaire"
105    
106  for mname in $MACHINES ; do  for mname in $MACHINES ; do
107    
# Line 135  for mname in $MACHINES ; do Line 134  for mname in $MACHINES ; do
134              OPTFILE="not_explicitly_specified"              OPTFILE="not_explicitly_specified"
135          fi          fi
136    
137            # EXTRA = non-standard list of experiment
138          ADJOINT=          ADJOINT=
139            TANGLIN=
140          RESTART=0          RESTART=0
141          NOI3E=0          EXTRA=
142            FAST=0
143            DVLP=0
144            MPI=0
145          MTH=0          MTH=0
146            UR4=0
147          if test -r $dir/summary.txt ; then          if test -r $dir/summary.txt ; then
148              comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`              comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
149              eval $comm              eval $comm
150                comm=`grep 'TANGLIN=true' $dir/summary.txt 2>/dev/null`
151                eval $comm
152              RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`              RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
153              NOI3E=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt`              comm=`grep '^run: .*testreport.* ' $dir/summary.txt`
154              MTH=`grep -c "^run: .*testreport.* -mth " $dir/summary.txt`              EXTRA=`echo "$comm" | grep " -*-tdir\>" | sed -e "s/^.* -*-tdir\>//" -e "s/ -.*$//"`
155                if test "x$EXTRA" = x ; then
156                    EXTRA=`echo "$comm" | grep " -*-t\>" | sed -e "s/^.*-*-t\>//" -e "s/ -.*$//"`
157                fi
158                if test "x$EXTRA" = x ; then EXTRA=0 ; else
159                    #echo -n "EXTRA=$EXTRA"
160                    nn0=`echo $EXTRA | sed "s/ *' *//g" | wc -w`
161                    nn1=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<monod_"`
162                    nn2=`echo $EXTRA | sed "s/ *' *//g" | tr ' ' '\n' | grep -c "\<darwin_"`
163                    EXTRA=1
164                    if [ $nn1 -ge 2 ] ; then EXTRA=2 ; fi
165                    if [ $nn2 -ge 2 ] ; then EXTRA=3 ; fi
166                    #echo " : nn0=$nn0 ; nn1=$nn1 ; nn2=$nn2"
167                fi
168                FAST=`echo "$comm" | grep -c " -*-fast\>"`
169                if test "x$FAST" = x0 ; then
170                    FAST=`echo "$comm" | grep -c " '*-noieee'*"`
171                fi
172                DVLP=`echo "$comm" | grep -c " -*-devel\>"`
173                MPI=`echo "$comm" | grep -c " -*-mpi\>"`
174                if test "x$MPI" = x0 ; then
175                    MPI=`echo "$comm" | grep -c " -*-MPI\>"`
176                fi
177                MTH=`echo "$comm" | grep -c " -*-mth\>"`
178                UR4=`echo "$comm" | grep -c " -*-use_r4\>"`
179                if test "x$UR4" = x0 ; then
180                    UR4=`echo "$comm" | grep -c " -*-ur4\>"`
181                fi
182          fi          fi
183          if test "x$RESTART" = x0 ; then          if test "x$ADJOINT" = xtrue ; then
184              kind="forward"              kind="adjoint" ; order=0
185              test "x$ADJOINT" = xtrue  &&  kind="adjoint"          elif test "x$TANGLIN" = xtrue ; then
186                kind="tanglin" ; order=1
187            elif test "x$RESTART" = x0 ; then
188                kind="forward" ; order=2
189          else          else
190              kind="restart"              kind="restart" ; order=3
191            fi
192            order=`expr $order + 10 \* $EXTRA`
193            order=`printf '%3.3i' $order`
194            if test "x$UR4" = x1 ; then
195                OPTFILE="${OPTFILE}.use_r4"
196            fi
197            if test "x$MPI" = x1 ; then
198                yy=`echo $OPTFILE | grep -c '+mpi'`
199                if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi
200          fi          fi
201          if test "x$MTH" = x1 ; then          if test "x$MTH" = x1 ; then
202              yy=`echo $OPTFILE | grep -c '+mth$'`              yy=`echo $OPTFILE | grep -c '+mth$'`
203              if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi              if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
204          fi          fi
205          if test "x$NOI3E" = x1 ; then          if test "x$FAST" = x1 ; then
206              OPTFILE="${OPTFILE}.noieee"              OPTFILE="${OPTFILE}.fast"
207            fi
208            if test "x$DVLP" = x1 ; then
209                OPTFILE="${OPTFILE}.dvlp"
210          fi          fi
211    
212          t_pass="--"          t_pass="--"
# Line 178  for mname in $MACHINES ; do Line 227  for mname in $MACHINES ; do
227          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")'`
228          rm -f ./ms_tmp          rm -f ./ms_tmp
229    
230          echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist          echo "$OPTFILE$order $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist
231    
232      done      done
233    
# Line 190  for mname in $MACHINES ; do Line 239  for mname in $MACHINES ; do
239      if test $num -gt 0 ; then      if test $num -gt 0 ; then
240    
241          # swap colors          # swap colors
242          ctmp=$color          ctmp=$color
243          color=$ncolor          color=$ncolor
244          ncolor=$ctmp          ncolor=$ctmp
245    
246          keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`          keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`
247    
# Line 204  for mname in $MACHINES ; do Line 253  for mname in $MACHINES ; do
253              optf=`echo $tline | cut -d " " -f 3`              optf=`echo $tline | cut -d " " -f 3`
254              DAY=`echo $tline | cut -d " " -f 2`              DAY=`echo $tline | cut -d " " -f 2`
255              URL="results/$PERIOD/$ldir"              URL="results/$PERIOD/$ldir"
256                #-- machine name to print:
257                sname=`echo $mname | sed 's/-$//'`
258                alt=`echo $key | sed "s/$optf//"`
259               #if   [ $alt -ge 30 ] ; then sname="${sname}.darwin"
260               #elif [ $alt -ge 20 ] ; then sname="${sname}.monod" ; fi
261              cat <<EOF >>$OUTFILE              cat <<EOF >>$OUTFILE
262  <tr bgcolor="$color">  <tr bgcolor="$color">
263    <td height="0"> $mname </td>    <td height="0"> $sname </td>
264    <td> $optf </td>    <td> $optf </td>
265    <td> $kind </td>    <td> $kind </td>
266    <td> <a href="$res_url$URL">$DAY</a> </td>    <td> <a href="$res_url$URL">$DAY</a> </td>

Legend:
Removed from v.1.61  
changed lines
  Added in v.1.76

  ViewVC Help
Powered by ViewVC 1.1.22