| 19 | 
     exit 1 | 
     exit 1 | 
| 20 | 
 } | 
 } | 
| 21 | 
  | 
  | 
| 22 | 
  | 
 old_summary() | 
| 23 | 
  | 
 { | 
| 24 | 
  | 
     #  Create the old-style summary file for $PERIOD | 
| 25 | 
  | 
     echo -n "Creating the summary file for the period \"$PERIOD\" ...  " | 
| 26 | 
  | 
     cat > $OUTFILE << EOF | 
| 27 | 
  | 
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" | 
| 28 | 
  | 
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | 
| 29 | 
  | 
  | 
| 30 | 
  | 
 <html xmlns="http://www.w3.org/1999/xhtml"> | 
| 31 | 
  | 
   <head> | 
| 32 | 
  | 
     <title>MITgcm testing summary</title> | 
| 33 | 
  | 
     <meta name="author" content="Ed Hill" /> | 
| 34 | 
  | 
     <base href="http://mitgcm.org/testing/summary/" /> | 
| 35 | 
  | 
   </head> | 
| 36 | 
  | 
   <body> | 
| 37 | 
  | 
     <table cellpadding="0" cellspacing="0" border="0" width="100%"> | 
| 38 | 
  | 
  | 
| 39 | 
  | 
 EOF | 
| 40 | 
  | 
  | 
| 41 | 
  | 
     # all_files=`find $INDIR -name summary.txt` | 
| 42 | 
  | 
     all_files=`( cd $INDIR ; find . -name summary.txt )` | 
| 43 | 
  | 
  | 
| 44 | 
  | 
     for f in $all_files ; do | 
| 45 | 
  | 
          | 
| 46 | 
  | 
         file=$INDIR"/"${f/.\//} | 
| 47 | 
  | 
         grep "^fresults" $file > /dev/null 2>&1 | 
| 48 | 
  | 
         RETVAL=$? | 
| 49 | 
  | 
         if test "x$RETVAL" != x0 ; then | 
| 50 | 
  | 
             continue | 
| 51 | 
  | 
         fi | 
| 52 | 
  | 
          | 
| 53 | 
  | 
         url=`echo $file | sed -e 's|/u/edhill/www|http://mitgcm.org/~edhill|'` | 
| 54 | 
  | 
         url=`echo $url | sed -e 's|summary.txt||'` | 
| 55 | 
  | 
         MACH= | 
| 56 | 
  | 
         fresults= | 
| 57 | 
  | 
         color="#eeeeee" | 
| 58 | 
  | 
          | 
| 59 | 
  | 
         source $file | 
| 60 | 
  | 
         echo $fresults | grep FAIL > /dev/null 2>&1 | 
| 61 | 
  | 
         if test "x$?" = x0 ; then | 
| 62 | 
  | 
             color="#ff99ff" | 
| 63 | 
  | 
         fi | 
| 64 | 
  | 
         echo $fresults | grep pass > /dev/null 2>&1 | 
| 65 | 
  | 
         if test "x$?" = x0 ; then | 
| 66 | 
  | 
             color="#99ffff" | 
| 67 | 
  | 
         fi | 
| 68 | 
  | 
          | 
| 69 | 
  | 
         gm_state=`echo $file | sed -e 's/summary.txt/genmake_state/g'` | 
| 70 | 
  | 
         if test -r $gm_state ; then | 
| 71 | 
  | 
             grep '^OPTFILE=' $gm_state > ./tmp_state | 
| 72 | 
  | 
             source ./tmp_state | 
| 73 | 
  | 
         else | 
| 74 | 
  | 
             optfile="unknown" | 
| 75 | 
  | 
         fi | 
| 76 | 
  | 
         optfile=`echo $OPTFILE | awk -F '/' '{print $NF}'` | 
| 77 | 
  | 
          | 
| 78 | 
  | 
         echo "<tr bgcolor=\"$color\">" >> $OUTFILE | 
| 79 | 
  | 
         echo "<td height=\"0\">$MACH</td>" >> $OUTFILE | 
| 80 | 
  | 
         echo "<td><a href=\"$url\">$DATE</a></td>" >> $OUTFILE | 
| 81 | 
  | 
         for i in $fresults ; do | 
| 82 | 
  | 
             if test "x$i" = xN ; then | 
| 83 | 
  | 
                 echo -n "<td bgcolor=\"#ff6666\">$i</td>" >> $OUTFILE | 
| 84 | 
  | 
             else | 
| 85 | 
  | 
                 echo -n "<td>$i</td>" >> $OUTFILE | 
| 86 | 
  | 
             fi | 
| 87 | 
  | 
         done | 
| 88 | 
  | 
         echo "<td>$optfile</td>" >> $OUTFILE | 
| 89 | 
  | 
         echo "</tr>" >> $OUTFILE | 
| 90 | 
  | 
          | 
| 91 | 
  | 
     done | 
| 92 | 
  | 
      | 
| 93 | 
  | 
     cat >> $OUTFILE << EOF | 
| 94 | 
  | 
  | 
| 95 | 
  | 
     </table> | 
| 96 | 
  | 
   </body> | 
| 97 | 
  | 
 </html> | 
| 98 | 
  | 
 EOF | 
| 99 | 
  | 
  | 
| 100 | 
  | 
     chmod a+r $OUTFILE | 
| 101 | 
  | 
     echo "done" | 
| 102 | 
  | 
 } | 
| 103 | 
  | 
  | 
| 104 | 
  | 
  | 
| 105 | 
 # defaults | 
 # defaults | 
| 106 | 
 PERIOD=`date +%Y`"_"`date +%m` | 
 PERIOD=`date +%Y`"_"`date +%m` | 
| 107 | 
  | 
  | 
| 141 | 
 OUTDIR="/u/u0/httpd/html/testing/summary" | 
 OUTDIR="/u/u0/httpd/html/testing/summary" | 
| 142 | 
 OUTFILE=$OUTDIR"/summary_"$PERIOD".html" | 
 OUTFILE=$OUTDIR"/summary_"$PERIOD".html" | 
| 143 | 
  | 
  | 
 | 
  | 
  | 
 | 
 #  Create the 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" | 
  | 
 | 
  | 
  | 
 | 
  | 
  | 
| 144 | 
 #  Create the "latest" links | 
 #  Create the "latest" links | 
| 145 | 
 echo "Creating the \"latest\" file for each machine: " | 
 echo "Creating the \"latest\" file for each machine: " | 
| 146 | 
 LATEST=$OUTDIR"/latest_"$PERIOD".html" | 
 LATEST=$OUTDIR"/latest_"$PERIOD".html" | 
| 157 | 
     <!-- <base href="http://mitgcm.org/testing/summary/" /> --> | 
     <!-- <base href="http://mitgcm.org/testing/summary/" /> --> | 
| 158 | 
  | 
  | 
| 159 | 
     <!-- Hinting for menu generation --> | 
     <!-- Hinting for menu generation --> | 
| 160 | 
     <meta name="add_name_0" content="Source Code" /> | 
     <meta name="add_name_0" content="Testing" /> | 
| 161 | 
     <meta name="add_name_1" content="Testing" /> | 
     <meta name="add_name_1" content="" /> | 
| 162 | 
     <meta name="add_name_2" content="" /> | 
     <meta name="add_name_2" content="" /> | 
| 163 | 
     <meta name="add_title" content="Testing" /> | 
     <meta name="add_title" content="Testing" /> | 
| 164 | 
     <!-- Hinting for menu generation --> | 
     <!-- Hinting for menu generation --> | 
| 204 | 
       <tr bgcolor="#bbffdd"> <td> IBM POWER4 SP </td> <td>"bs"</td> | 
       <tr bgcolor="#bbffdd"> <td> IBM POWER4 SP </td> <td>"bs"</td> | 
| 205 | 
         <td><a href="http://www.scd.ucar.edu/computers/bluesky/">NCAR Bluesky | 
         <td><a href="http://www.scd.ucar.edu/computers/bluesky/">NCAR Bluesky | 
| 206 | 
         </a></td> </tr> | 
         </a></td> </tr> | 
| 207 | 
       <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"eaps"</td> | 
       <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"adams"</td> | 
| 208 | 
         <td>SuSE Linux 9.0 (x86-64)</td> </tr> | 
         <td>SuSE Linux 9.0 (x86-64)</td> </tr> | 
| 209 | 
  | 
  | 
| 210 | 
  | 
       <tr bgcolor="#bbffdd"> <td> Sun UltraSparc </td> <td>"slough"</td> | 
| 211 | 
  | 
         <td>Solaris 8</td> </tr> | 
| 212 | 
  | 
       <tr bgcolor="#bbddff"> <td> Intel P4 Mosix Cluster </td> <td>"sea"</td> | 
| 213 | 
  | 
         <td>Red Hat v7.2</td> </tr> | 
| 214 | 
  | 
  | 
| 215 | 
  | 
       <tr bgcolor="#bbddff"> <td> AMD Athlon </td> <td>"eddy"</td> | 
| 216 | 
  | 
         <td>Red Hat 9</td> </tr> | 
| 217 | 
  | 
  | 
| 218 | 
       <!-- | 
       <!-- | 
| 219 | 
       <tr bgcolor="#bbddff"> <td>  </td> <td>""</td> | 
       <tr bgcolor="#bbddff"> <td>  </td> <td>""</td> | 
| 220 | 
         <td></td> </tr> | 
         <td></td> </tr> | 
| 234 | 
   <td> <b>Type</b> </td> | 
   <td> <b>Type</b> </td> | 
| 235 | 
   <td> <b>Date</b> </td> | 
   <td> <b>Date</b> </td> | 
| 236 | 
   <td> <b>Summary</b> </td> | 
   <td> <b>Summary</b> </td> | 
| 237 | 
  | 
   <td> <b>Ratio</b> </td> | 
| 238 | 
 </tr> | 
 </tr> | 
| 239 | 
  | 
  | 
| 240 | 
 EOF | 
 EOF | 
| 242 | 
 color="#bbffdd" | 
 color="#bbffdd" | 
| 243 | 
 res_url="http://mitgcm.org/testing/" | 
 res_url="http://mitgcm.org/testing/" | 
| 244 | 
  | 
  | 
| 245 | 
 MACHINES="faulks shelley myrinet eaps halem hopper lomax orion bf bs" | 
 MACHINES="faulks shelley myrinet eaps halem hopper lomax orion bf bs slough sea eddy adams" | 
| 246 | 
  | 
  | 
| 247 | 
 ( cd $INDIR ; ls -1 ) > ./dir_all | 
 ( cd $INDIR ; ls -1 ) > ./dir_all | 
| 248 | 
  | 
  | 
| 293 | 
             test "x$ADJOINT" = xtrue  &&  kind="adjoint" | 
             test "x$ADJOINT" = xtrue  &&  kind="adjoint" | 
| 294 | 
         fi | 
         fi | 
| 295 | 
  | 
  | 
| 296 | 
  | 
         t_pass="--" | 
| 297 | 
  | 
         t_tot="--" | 
| 298 | 
  | 
         if test -r $dir/summary.txt ; then | 
| 299 | 
  | 
             grep '^[YN] [YN] [YN] [YN] ' $dir/summary.txt > ./all_tests 2>/dev/null | 
| 300 | 
  | 
             t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'` | 
| 301 | 
  | 
             grep '^Y Y Y Y ' ./all_tests > ./all_ran 2>/dev/null | 
| 302 | 
  | 
             grep advect_ ./all_ran 2>/dev/null > ./all_ran_advect | 
| 303 | 
  | 
             t_advect=`cat ./all_ran_advect | wc -l | sed -e 's| ||g'` | 
| 304 | 
  | 
             digits=`cat ./all_ran_advect | awk '{print $9}'` | 
| 305 | 
  | 
             t_advect_pass=0 | 
| 306 | 
  | 
             for k in $digits ; do | 
| 307 | 
  | 
                 test "x$k" = x--   &&  k=0 | 
| 308 | 
  | 
                 test $k -ge 9  &&  t_advect_pass=$(( $t_advect_pass + 1 )) | 
| 309 | 
  | 
             done | 
| 310 | 
  | 
             grep -v advect ./all_ran 2>/dev/null > ./all_ran_noadvect | 
| 311 | 
  | 
             digits=`cat ./all_ran_noadvect | awk '{print $5}'` | 
| 312 | 
  | 
             t_sum=0 | 
| 313 | 
  | 
             for k in $digits ; do | 
| 314 | 
  | 
                 test "x$k" = x--   &&  k=0 | 
| 315 | 
  | 
                 test $k -ge 9  &&  t_sum=$(( $t_sum + 1 )) | 
| 316 | 
  | 
             done | 
| 317 | 
  | 
             t_pass=$(( $t_sum + $t_advect_pass )) | 
| 318 | 
  | 
         fi | 
| 319 | 
  | 
         rm -f ./all_tests ./all_ran ./all_ran_advect ./all_ran_noadvect | 
| 320 | 
  | 
         # echo "${dir##*/} : $t_pass out of $t_tot" | 
| 321 | 
  | 
  | 
| 322 | 
         tokens=`echo $i | sed -e 's|_| |g'` | 
         tokens=`echo $i | sed -e 's|_| |g'` | 
| 323 | 
         echo "" > ./ms_tmp | 
         echo "" > ./ms_tmp | 
| 324 | 
         for tok in $tokens ; do | 
         for tok in $tokens ; do | 
| 327 | 
         DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'` | 
         DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'` | 
| 328 | 
         rm -f ./ms_tmp | 
         rm -f ./ms_tmp | 
| 329 | 
  | 
  | 
| 330 | 
         echo "$OPTFILE$kind $DAY $OPTFILE $kind $i" >> ./mlist | 
         echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist | 
| 331 | 
  | 
  | 
| 332 | 
     done | 
     done | 
| 333 | 
  | 
  | 
| 341 | 
  | 
  | 
| 342 | 
         for key in $keys ; do | 
         for key in $keys ; do | 
| 343 | 
             tline=`grep "^$key " ./mlist | sort -r | head -1` | 
             tline=`grep "^$key " ./mlist | sort -r | head -1` | 
| 344 | 
  | 
             ratio=`echo $tline | cut -d " " -f 6` | 
| 345 | 
             ldir=`echo $tline | cut -d " " -f 5` | 
             ldir=`echo $tline | cut -d " " -f 5` | 
| 346 | 
             kind=`echo $tline | cut -d " " -f 4` | 
             kind=`echo $tline | cut -d " " -f 4` | 
| 347 | 
             optf=`echo $tline | cut -d " " -f 3` | 
             optf=`echo $tline | cut -d " " -f 3` | 
| 354 | 
   <td> $kind </td> | 
   <td> $kind </td> | 
| 355 | 
   <td> <a href="$res_url$URL">$DAY</a> </td> | 
   <td> <a href="$res_url$URL">$DAY</a> </td> | 
| 356 | 
   <td> <a href="$res_url$URL/summary.txt"> summary.txt </a> </td> | 
   <td> <a href="$res_url$URL/summary.txt"> summary.txt </a> </td> | 
| 357 | 
  | 
   <td> $ratio </td> | 
| 358 | 
 </tr> | 
 </tr> | 
| 359 | 
 EOF | 
 EOF | 
| 360 | 
         done | 
         done | 
| 364 | 
  | 
  | 
| 365 | 
 cat >> $LATEST << EOF | 
 cat >> $LATEST << EOF | 
| 366 | 
 <tr bgcolor="#00cccc"> | 
 <tr bgcolor="#00cccc"> | 
| 367 | 
   <td height="0" colspan="5" align="center" > | 
   <td height="0" colspan="6" align="center" >This table generated on: $the_date</td> | 
| 368 | 
     === This table generated on: $the_date === | 
 </tr> | 
 | 
   </td>      | 
  | 
 | 
 </tr>        | 
  | 
| 369 | 
  | 
  | 
| 370 | 
     </table> | 
     </table> | 
| 371 | 
  | 
  | 
| 372 | 
  | 
 <p>Examples of the scripts used for these testing runs can be obtained | 
| 373 | 
  | 
 from <a | 
| 374 | 
  | 
 href="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/"> | 
| 375 | 
  | 
 the "contrib" area of the MITgcm CVS archive</a>.</p> | 
| 376 | 
  | 
  | 
| 377 | 
  | 
  | 
| 378 | 
   </body> | 
   </body> | 
| 379 | 
 </html> | 
 </html> | 
| 380 | 
  | 
  |