| 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 | 
  | 
  | 
| 22 | 
 old_summary() | 
 export LC_ALL="en_US.UTF-8" | 
| 23 | 
 { | 
 CURR_PER=`date +%Y`"_"`date +%m` | 
 | 
     #  Create the old-style summary file for $PERIOD | 
  | 
 | 
     echo -n "Creating the summary file for the period \"$PERIOD\" ...  " | 
  | 
 | 
     cat > $OUTFILE << EOF | 
  | 
 | 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 
  | 
 | 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 
  | 
 | 
  | 
  | 
 | 
 <html xmlns="http://www.w3.org/1999/xhtml"> | 
  | 
 | 
   <head> | 
  | 
 | 
     <title>MITgcm testing summary</title> | 
  | 
 | 
     <meta name="author" content="Ed Hill" /> | 
  | 
 | 
     <base href="http://mitgcm.org/testing/summary/" /> | 
  | 
 | 
   </head> | 
  | 
 | 
   <body> | 
  | 
 | 
     <table cellpadding="0" cellspacing="0" border="0" width="100%"> | 
  | 
 | 
  | 
  | 
 | 
 EOF | 
  | 
 | 
  | 
  | 
 | 
     # all_files=`find $INDIR -name summary.txt` | 
  | 
 | 
     all_files=`( cd $INDIR ; find . -name summary.txt )` | 
  | 
 | 
  | 
  | 
 | 
     for f in $all_files ; do | 
  | 
 | 
          | 
  | 
 | 
         file=$INDIR"/"${f/.\//} | 
  | 
 | 
         grep "^fresults" $file > /dev/null 2>&1 | 
  | 
 | 
         RETVAL=$? | 
  | 
 | 
         if test "x$RETVAL" != x0 ; then | 
  | 
 | 
             continue | 
  | 
 | 
         fi | 
  | 
 | 
          | 
  | 
 | 
         url=`echo $file | sed -e 's|/u/edhill/www|http://mitgcm.org/~edhill|'` | 
  | 
 | 
         url=`echo $url | sed -e 's|summary.txt||'` | 
  | 
 | 
         MACH= | 
  | 
 | 
         fresults= | 
  | 
 | 
         color="#eeeeee" | 
  | 
 | 
          | 
  | 
 | 
         source $file | 
  | 
 | 
         echo $fresults | grep FAIL > /dev/null 2>&1 | 
  | 
 | 
         if test "x$?" = x0 ; then | 
  | 
 | 
             color="#ff99ff" | 
  | 
 | 
         fi | 
  | 
 | 
         echo $fresults | grep pass > /dev/null 2>&1 | 
  | 
 | 
         if test "x$?" = x0 ; then | 
  | 
 | 
             color="#99ffff" | 
  | 
 | 
         fi | 
  | 
 | 
          | 
  | 
 | 
         gm_state=`echo $file | sed -e 's/summary.txt/genmake_state/g'` | 
  | 
 | 
         if test -r $gm_state ; then | 
  | 
 | 
             grep '^OPTFILE=' $gm_state > ./tmp_state | 
  | 
 | 
             source ./tmp_state | 
  | 
 | 
         else | 
  | 
 | 
             optfile="unknown" | 
  | 
 | 
         fi | 
  | 
 | 
         optfile=`echo $OPTFILE | awk -F '/' '{print $NF}'` | 
  | 
 | 
          | 
  | 
 | 
         echo "<tr bgcolor=\"$color\">" >> $OUTFILE | 
  | 
 | 
         echo "<td height=\"0\">$MACH</td>" >> $OUTFILE | 
  | 
 | 
         echo "<td><a href=\"$url\">$DATE</a></td>" >> $OUTFILE | 
  | 
 | 
         for i in $fresults ; do | 
  | 
 | 
             if test "x$i" = xN ; then | 
  | 
 | 
                 echo -n "<td bgcolor=\"#ff6666\">$i</td>" >> $OUTFILE | 
  | 
 | 
             else | 
  | 
 | 
                 echo -n "<td>$i</td>" >> $OUTFILE | 
  | 
 | 
             fi | 
  | 
 | 
         done | 
  | 
 | 
         echo "<td>$optfile</td>" >> $OUTFILE | 
  | 
 | 
         echo "</tr>" >> $OUTFILE | 
  | 
 | 
          | 
  | 
 | 
     done | 
  | 
 | 
      | 
  | 
 | 
     cat >> $OUTFILE << EOF | 
  | 
 | 
  | 
  | 
 | 
     </table> | 
  | 
 | 
   </body> | 
  | 
 | 
 </html> | 
  | 
 | 
 EOF | 
  | 
 | 
  | 
  | 
 | 
     chmod a+r $OUTFILE | 
  | 
 | 
     echo "done" | 
  | 
 | 
 } | 
  | 
 | 
  | 
  | 
 | 
  | 
  | 
| 24 | 
 # defaults | 
 # defaults | 
| 25 | 
 PERIOD=`date +%Y`"_"`date +%m` | 
 PERIOD=$CURR_PER | 
| 26 | 
  | 
  | 
| 27 | 
 #  Parse options | 
 #  Parse options | 
| 28 | 
 ac_prev= | 
 ac_prev= | 
| 29 | 
 for ac_option ; do | 
 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) | 
| 46 | 
             ac_prev=PERIOD ;; | 
             ac_prev=PERIOD ;; | 
| 47 | 
         --date=* | -date=*) | 
         --date=* | -date=*) | 
| 48 | 
             PERIOD=$ac_optarg ;; | 
             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 | 
       | 
  | 
| 57 | 
 done | 
 done | 
| 58 | 
  | 
  | 
| 59 | 
  | 
 #INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD" | 
| 60 | 
  | 
 #OUTDIR="/home/jmc/mitgcm/test_web/summary" | 
| 61 | 
 INDIR="/u/u0/httpd/html/testing/results/$PERIOD" | 
 INDIR="/u/u0/httpd/html/testing/results/$PERIOD" | 
| 62 | 
 OUTDIR="/u/u0/httpd/html/testing/summary" | 
 OUTDIR="/u/u0/httpd/html/testing/summary" | 
 | 
 OUTFILE=$OUTDIR"/summary_"$PERIOD".html" | 
  | 
| 63 | 
  | 
  | 
| 64 | 
 #  Create the "latest" links | 
 OUTFILE=$OUTDIR"/output_"$PERIOD".html" | 
| 65 | 
  | 
 res_url="http://mitgcm.org/testing/" | 
| 66 | 
  | 
  | 
| 67 | 
  | 
 #  Create the links in $OUTFILE : | 
| 68 | 
 echo "Creating the \"latest\" file for each machine: " | 
 echo "Creating the \"latest\" file for each machine: " | 
 | 
 LATEST=$OUTDIR"/latest_"$PERIOD".html" | 
  | 
| 69 | 
 the_date=`date` | 
 the_date=`date` | 
 | 
 cat > $LATEST << EOF | 
  | 
 | 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 
  | 
 | 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 
  | 
 | 
  | 
  | 
 | 
 <html xmlns="http://www.w3.org/1999/xhtml"> | 
  | 
 | 
   <head> | 
  | 
 | 
     <title>MITgcm testing summary</title> | 
  | 
 | 
     <meta name="author" content="Ed Hill" /> | 
  | 
 | 
  | 
  | 
 | 
     <!-- <base href="http://mitgcm.org/testing/summary/" /> --> | 
  | 
 | 
  | 
  | 
 | 
     <!-- Hinting for menu generation --> | 
  | 
 | 
     <meta name="add_name_0" content="Testing" /> | 
  | 
 | 
     <meta name="add_name_1" content="" /> | 
  | 
 | 
     <meta name="add_name_2" content="" /> | 
  | 
 | 
     <meta name="add_title" content="Testing" /> | 
  | 
 | 
     <!-- Hinting for menu generation --> | 
  | 
 | 
  | 
  | 
 | 
   </head> | 
  | 
 | 
   <body> | 
  | 
 | 
     <p>The MITgcm model is tested  | 
  | 
 | 
       (compiled and run) in an automated fashion on a varirety of  | 
  | 
 | 
       different machines.  The following is a summary of the MITgcm  | 
  | 
 | 
       verification suite for the time period: <b>$PERIOD</b>.</p> | 
  | 
 | 
  | 
  | 
 | 
     <p>The machine naming scheme is:<br /></p> | 
  | 
 | 
     <table align="center" cellpadding="0" border="0"> | 
  | 
 | 
       <tr bgcolor="#00cccc"> <td><b>Machine Type</b></td> <td><b>Nickname</b></td> | 
  | 
 | 
         <td><b>Notes</b></td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td>Intel P4</td> <td>"faulks"</td>  | 
  | 
 | 
         <td>Red Hat 7.3 (the "original" testing machine)</td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td>Intel P4</td> <td>"hemmingway"</td> | 
  | 
 | 
         <td>Fedora Core release 1 (gcc 3.3.2)</td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> Intel P3/P4 Beowulf </td> <td>"myrinet"</td> | 
  | 
 | 
         <td><a href="http://mitgcm.org/projects/MITGCM_CLUSTER/">MITgcm cluster  | 
  | 
 | 
         facility </a></td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td>Alpha cluster</td> <td>"halem"</td> | 
  | 
 | 
         <td><a href="http://webserv.gsfc.nasa.gov/SCB/NCCS/systems/high-end-computing.html"> | 
  | 
 | 
         NASA NCCS Halem</a></td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> SGI Origin 2000 </td> <td>"hopper"</td> | 
  | 
 | 
         <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O2K/o2k.html"> | 
  | 
 | 
         NAS SGI Origin 2000 </a></td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td> SGI Origin 3000 </td> <td>"lomax"</td> | 
  | 
 | 
         <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O3K/o3k.html"> | 
  | 
 | 
         NAS SGI Origin 3000 </a></td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> SGI Altix </td> <td>"orion"</td> | 
  | 
 | 
         <td><a href="http://sc.jpl.nasa.gov/">JPL Supercomputing and  | 
  | 
 | 
         Visualization Facility</a></td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td> IBM POWER3 SP </td> <td>"bf"</td> | 
  | 
 | 
         <td><a href="http://www.scd.ucar.edu/computers/blackforest/">NCAR Blackforest | 
  | 
 | 
         </a></td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> IBM POWER4 SP </td> <td>"bs"</td> | 
  | 
 | 
         <td><a href="http://www.scd.ucar.edu/computers/bluesky/">NCAR Bluesky | 
  | 
 | 
         </a></td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"adams"</td> | 
  | 
 | 
         <td>SuSE Linux 9.0 (x86-64)</td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> Sun UltraSparc </td> <td>"slough"</td> | 
  | 
 | 
         <td>Solaris 8</td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td> Intel P4 Mosix Cluster </td> <td>"sea"</td> | 
  | 
 | 
         <td>Red Hat v7.2</td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> AMD Athlon XP 2500+</td> <td>"eddy"</td> | 
  | 
 | 
         <td>Fedora Core release 1.91 (FC2 Test 2) [gcc 3.3.3]</td> </tr> | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td> AMD Opteron cluster </td> <td>"dolphin"</td> | 
  | 
 | 
         <td>SuSE SLES v8.1</td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <!-- | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbffdd"> <td> Intel P4 </td> <td>"hemmingway"</td> | 
  | 
 | 
         <td>Fedora Core release 1 (gcc 3.3.2) </td> </tr> | 
  | 
 | 
  | 
  | 
 | 
       <tr bgcolor="#bbddff"> <td>  </td> <td>""</td> | 
  | 
 | 
         <td></td> </tr> | 
  | 
 | 
       --> | 
  | 
| 70 | 
  | 
  | 
| 71 | 
     </table> | 
 sed "s/_PERIOD/$PERIOD/" summary_head > $OUTFILE | 
| 72 | 
  | 
 cat <<EOF >>$OUTFILE | 
 | 
     <p><br /> | 
  | 
 | 
       The complete output for the verification runs can be found in | 
  | 
 | 
       <a href="http://mitgcm.org/testing/summary/">the summary pages</a> | 
  | 
 | 
       and the <a href="http://mitgcm.org/testing/results/">testing archives</a>.  | 
  | 
 | 
       The latest reports are:</p> | 
  | 
| 73 | 
     <table align="center" cellpadding="0" cellspacing="0" border="0" width="95%"> | 
     <table align="center" cellpadding="0" cellspacing="0" border="0" width="95%"> | 
| 74 | 
 <tr bgcolor="#00cccc"> | 
 <tr bgcolor="#00cccc"> | 
| 75 | 
   <td height="0"> <b>Nickname</b> </td> | 
   <td height="0"> <b>Nickname</b> </td> | 
| 84 | 
  | 
  | 
| 85 | 
 color="#bbffdd" | 
 color="#bbffdd" | 
| 86 | 
 ncolor="#bbddff" | 
 ncolor="#bbddff" | 
 | 
 res_url="http://mitgcm.org/testing/" | 
  | 
 | 
  | 
  | 
 | 
 MACHINES="faulks shelley myrinet eaps halem hopper lomax orion bf bs slough sea" | 
  | 
 | 
 MACHINES="$MACHINES  eddy adams dolphin hemmingway" | 
  | 
| 87 | 
  | 
  | 
| 88 | 
 ( cd $INDIR ; ls -1 ) > ./dir_all | 
 MACHINES="faulks meander aces- acesgrid baudelaire dickens danton beagle harbor" | 
| 89 | 
  | 
 MACHINES="$MACHINES pleiades iblade rays solasrv sx8" | 
| 90 | 
  | 
 MACHINES="$MACHINES trane dodongo dokdo stomp bigred" | 
| 91 | 
  | 
  | 
| 92 | 
  | 
 ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all | 
| 93 | 
  | 
  | 
| 94 | 
  | 
 MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq` | 
| 95 | 
  | 
 for madd in $MALL ; do | 
| 96 | 
  | 
     present=0 | 
| 97 | 
  | 
     for m in $MACHINES ; do | 
| 98 | 
  | 
         echo $madd | grep $m > /dev/null 2>&1 | 
| 99 | 
  | 
         RETVAL=$? | 
| 100 | 
  | 
         test $RETVAL = 0  &&  present=1 | 
| 101 | 
  | 
         continue | 
| 102 | 
  | 
     done | 
| 103 | 
  | 
     test $present = 0  &&  MACHINES="$MACHINES $madd" | 
| 104 | 
  | 
 done | 
| 105 | 
  | 
 #MACHINES="baudelaire" | 
| 106 | 
  | 
  | 
| 107 | 
 for mname in $MACHINES ; do | 
 for mname in $MACHINES ; do | 
| 108 | 
  | 
  | 
| 109 | 
     echo "  $mname" | 
     echo "  $mname" | 
| 110 | 
  | 
     sname=`echo $mname | sed 's/-$//'` | 
| 111 | 
  | 
  | 
| 112 | 
     dir_list=`grep $mname ./dir_all` | 
     dir_list=`grep $mname ./dir_all` | 
| 113 | 
     echo -n "" > ./mlist | 
     echo -n "" > ./mlist | 
| 127 | 
             OPTFILE=${OPTFILE##*/} | 
             OPTFILE=${OPTFILE##*/} | 
| 128 | 
         fi | 
         fi | 
| 129 | 
         if test "x$OPTFILE" = x ; then | 
         if test "x$OPTFILE" = x ; then | 
| 130 | 
             comm=`grep '^# OPTFILE=' $dir/*/Makefile 2>/dev/null | head -1` | 
             comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1` | 
| 131 | 
             comm=${comm##*#} | 
             comm=${comm##*#} | 
| 132 | 
             eval $comm | 
             eval $comm | 
| 133 | 
             OPTFILE=${OPTFILE##*/} | 
             OPTFILE=${OPTFILE##*/} | 
| 137 | 
         fi | 
         fi | 
| 138 | 
  | 
  | 
| 139 | 
         ADJOINT= | 
         ADJOINT= | 
| 140 | 
  | 
         RESTART=0 | 
| 141 | 
  | 
         FAST=0 | 
| 142 | 
  | 
         DVLP=0 | 
| 143 | 
  | 
         MPI=0 | 
| 144 | 
  | 
         MTH=0 | 
| 145 | 
  | 
         UR4=0 | 
| 146 | 
         if test -r $dir/summary.txt ; then | 
         if test -r $dir/summary.txt ; then | 
| 147 | 
             comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null` | 
             comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null` | 
| 148 | 
             eval $comm | 
             eval $comm | 
| 149 | 
  | 
             RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt` | 
| 150 | 
  | 
             FAST=`grep -c "^run: .*testreport.* '*-fast'*" $dir/summary.txt` | 
| 151 | 
  | 
             if test "x$FAST" = x0 ; then | 
| 152 | 
  | 
               FAST=`grep -c "^run: .*testreport.* '*-noieee'*" $dir/summary.txt` | 
| 153 | 
  | 
             fi | 
| 154 | 
  | 
             DVLP=`grep -c "^run: .*testreport.* '*-devel'*" $dir/summary.txt` | 
| 155 | 
  | 
             MPI=`grep -c "^run: .*testreport.* -mpi " $dir/summary.txt` | 
| 156 | 
  | 
             if test "x$MPI" = x0 ; then | 
| 157 | 
  | 
                MPI=`grep -c "^run: .*testreport.* -MPI " $dir/summary.txt` | 
| 158 | 
  | 
             fi | 
| 159 | 
  | 
             MTH=`grep -c "^run: .*testreport.* -mth " $dir/summary.txt` | 
| 160 | 
  | 
             UR4=`grep -c "^run: .*testreport.* -use_r4 " $dir/summary.txt` | 
| 161 | 
  | 
             if test "x$UR4" = x0 ; then | 
| 162 | 
  | 
                UR4=`grep -c "^run: .*testreport.* -ur4 " $dir/summary.txt` | 
| 163 | 
  | 
             fi | 
| 164 | 
         fi | 
         fi | 
| 165 | 
         if test "x$ADJOINT" = x ; then | 
         if test "x$ADJOINT" = xtrue ; then  | 
| 166 | 
             kind="forward" | 
             kind="adjoint" ; order='000' | 
| 167 | 
  | 
         elif test "x$RESTART" = x0 ; then | 
| 168 | 
  | 
             kind="forward" ; order='001' | 
| 169 | 
         else | 
         else | 
| 170 | 
             test "x$ADJOINT" = xtrue  &&  kind="adjoint" | 
             kind="restart" ; order='002' | 
| 171 | 
  | 
         fi | 
| 172 | 
  | 
         if test "x$UR4" = x1 ; then | 
| 173 | 
  | 
             OPTFILE="${OPTFILE}.use_r4" | 
| 174 | 
  | 
         fi | 
| 175 | 
  | 
         if test "x$MPI" = x1 ; then | 
| 176 | 
  | 
             yy=`echo $OPTFILE | grep -c '+mpi'` | 
| 177 | 
  | 
             if test $yy = 0 ; then OPTFILE="${OPTFILE}+mpi" ; fi | 
| 178 | 
  | 
         fi | 
| 179 | 
  | 
         if test "x$MTH" = x1 ; then | 
| 180 | 
  | 
             yy=`echo $OPTFILE | grep -c '+mth$'` | 
| 181 | 
  | 
             if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi | 
| 182 | 
  | 
         fi | 
| 183 | 
  | 
         if test "x$FAST" = x1 ; then | 
| 184 | 
  | 
             OPTFILE="${OPTFILE}.fast" | 
| 185 | 
  | 
         fi | 
| 186 | 
  | 
         if test "x$DVLP" = x1 ; then | 
| 187 | 
  | 
             OPTFILE="${OPTFILE}.dvlp" | 
| 188 | 
         fi | 
         fi | 
| 189 | 
  | 
  | 
| 190 | 
         t_pass="--" | 
         t_pass="--" | 
| 191 | 
         t_tot="--" | 
         t_tot="--" | 
| 192 | 
         if test -r $dir/summary.txt ; then | 
         if test -r $dir/summary.txt ; then | 
| 193 | 
             grep '^[YN] [YN] [YN] [YN] ' $dir/summary.txt > ./all_tests 2>/dev/null | 
             grep '^[YN] [YN] [YN] [YN]' $dir/summary.txt > ./all_tests 2>/dev/null | 
| 194 | 
             t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'` | 
             t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'` | 
| 195 | 
             grep '^Y Y Y Y ' ./all_tests > ./all_ran 2>/dev/null | 
             t_pass=`grep '^Y Y Y Y' ./all_tests | grep 'pass ' | wc -l | sed -e 's| ||g'` | 
 | 
             grep advect_ ./all_ran 2>/dev/null > ./all_ran_advect | 
  | 
 | 
             t_advect=`cat ./all_ran_advect | wc -l | sed -e 's| ||g'` | 
  | 
 | 
             digits=`cat ./all_ran_advect | awk '{print $9}'` | 
  | 
 | 
             t_advect_pass=0 | 
  | 
 | 
             for k in $digits ; do | 
  | 
 | 
                 test "x$k" = x--   &&  k=0 | 
  | 
 | 
                 test $k -ge 9  &&  t_advect_pass=$(( $t_advect_pass + 1 )) | 
  | 
 | 
             done | 
  | 
 | 
             grep -v advect ./all_ran 2>/dev/null > ./all_ran_noadvect | 
  | 
 | 
             digits=`cat ./all_ran_noadvect | awk '{print $5}'` | 
  | 
 | 
             t_sum=0 | 
  | 
 | 
             for k in $digits ; do | 
  | 
 | 
                 test "x$k" = x--   &&  k=0 | 
  | 
 | 
                 test $k -ge 9  &&  t_sum=$(( $t_sum + 1 )) | 
  | 
 | 
             done | 
  | 
 | 
             t_pass=$(( $t_sum + $t_advect_pass )) | 
  | 
| 196 | 
         fi | 
         fi | 
| 197 | 
         rm -f ./all_tests ./all_ran ./all_ran_advect ./all_ran_noadvect | 
         rm -f ./all_tests | 
| 198 | 
         # echo "${dir##*/} : $t_pass out of $t_tot" | 
         # echo "${dir##*/} : $t_pass out of $t_tot" | 
| 199 | 
  | 
  | 
| 200 | 
         tokens=`echo $i | sed -e 's|_| |g'` | 
         tokens=`echo $i | sed -e 's|_| |g'` | 
| 202 | 
         for tok in $tokens ; do | 
         for tok in $tokens ; do | 
| 203 | 
             echo $tok >> ./ms_tmp | 
             echo $tok >> ./ms_tmp | 
| 204 | 
         done | 
         done | 
| 205 | 
         DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'` | 
         DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,2)=="20")'` | 
| 206 | 
         rm -f ./ms_tmp | 
         rm -f ./ms_tmp | 
| 207 | 
  | 
  | 
| 208 | 
         echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist | 
         echo "$OPTFILE$order $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist | 
| 209 | 
  | 
  | 
| 210 | 
     done | 
     done | 
| 211 | 
  | 
  | 
| 224 | 
         keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq` | 
         keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq` | 
| 225 | 
  | 
  | 
| 226 | 
         for key in $keys ; do | 
         for key in $keys ; do | 
| 227 | 
             tline=`grep "^$key " ./mlist | sort -r | head -1` | 
             tline=`grep "^$key " ./mlist | head -1` | 
| 228 | 
             ratio=`echo $tline | cut -d " " -f 6` | 
             ratio=`echo $tline | cut -d " " -f 6` | 
| 229 | 
             ldir=`echo $tline | cut -d " " -f 5` | 
             ldir=`echo $tline | cut -d " " -f 5` | 
| 230 | 
             kind=`echo $tline | cut -d " " -f 4` | 
             kind=`echo $tline | cut -d " " -f 4` | 
| 231 | 
             optf=`echo $tline | cut -d " " -f 3` | 
             optf=`echo $tline | cut -d " " -f 3` | 
| 232 | 
             DAY=`echo $tline | cut -d " " -f 2` | 
             DAY=`echo $tline | cut -d " " -f 2` | 
| 233 | 
             URL="results/$PERIOD/$ldir" | 
             URL="results/$PERIOD/$ldir" | 
| 234 | 
             cat <<EOF >>$LATEST | 
             cat <<EOF >>$OUTFILE | 
| 235 | 
 <tr bgcolor="$color"> | 
 <tr bgcolor="$color"> | 
| 236 | 
   <td height="0"> $mname </td> | 
   <td height="0"> $sname </td> | 
| 237 | 
   <td> $optf </td> | 
   <td> $optf </td> | 
| 238 | 
   <td> $kind </td> | 
   <td> $kind </td> | 
| 239 | 
   <td> <a href="$res_url$URL">$DAY</a> </td> | 
   <td> <a href="$res_url$URL">$DAY</a> </td> | 
| 246 | 
  | 
  | 
| 247 | 
 done | 
 done | 
| 248 | 
  | 
  | 
| 249 | 
 cat >> $LATEST << EOF | 
 cat >> $OUTFILE << EOF | 
| 250 | 
 <tr bgcolor="#00cccc"> | 
 <tr bgcolor="#00cccc"> | 
| 251 | 
   <td height="0" colspan="6" align="center" >This table generated on: $the_date</td> | 
   <td height="0" colspan="6" align="center" >This table generated on: $the_date</td> | 
| 252 | 
 </tr> | 
 </tr> | 
| 253 | 
  | 
  | 
| 254 | 
     </table> | 
     </table> | 
| 255 | 
  | 
  | 
| 256 | 
 <p>Examples of the scripts used for these testing runs can be obtained | 
 <p>Examples of the scripts used for these testing runs can be obtained from: <a | 
| 257 | 
 from <a | 
 href="http://mitgcm.org/viewvc/MITgcm/MITgcm/tools/example_scripts/"> | 
| 258 | 
 href="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/"> | 
 MITgcm/tools/example_scripts</a>.</p> | 
 | 
 the "contrib" area of the MITgcm CVS archive</a>.</p> | 
  | 
| 259 | 
  | 
  | 
| 260 | 
  | 
  | 
| 261 | 
   </body> | 
   </body> | 
| 265 | 
  | 
  | 
| 266 | 
 rm -f ./dir_all ./mlist | 
 rm -f ./dir_all ./mlist | 
| 267 | 
  | 
  | 
| 268 | 
 CURR_PER=`date +%Y`"_"`date +%m` | 
 #- put the file in place | 
| 269 | 
  | 
 chgrp gcmpack $OUTFILE | 
| 270 | 
  | 
 chmod 664 $OUTFILE | 
| 271 | 
  | 
 LATEST=$OUTDIR"/latest_"$PERIOD".html" | 
| 272 | 
  | 
 mv -f $OUTFILE $LATEST | 
| 273 | 
  | 
  | 
| 274 | 
 if test "x$PERIOD" = "x$CURR_PER" ; then | 
 if test "x$PERIOD" = "x$CURR_PER" ; then | 
| 275 | 
     cp $LATEST ./testing.xml | 
     cp $LATEST ./testing.xml | 
| 276 | 
     ( | 
     ( |