/[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.30 by jmc, Wed Sep 12 22:06:05 2007 UTC revision 1.31 by jmc, Mon Sep 17 16:01:33 2007 UTC
# Line 19  usage() Line 19  usage()
19      exit 1      exit 1
20  }  }
21    
 old_summary()  
 {  
     #  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"  
 }  
   
   
22  # defaults  # defaults
23  PERIOD=`date +%Y`"_"`date +%m`  PERIOD=`date +%Y`"_"`date +%m`
24    
# Line 262  color="#bbffdd" Line 179  color="#bbffdd"
179  ncolor="#bbddff"  ncolor="#bbddff"
180  res_url="http://mitgcm.org/testing/"  res_url="http://mitgcm.org/testing/"
181    
182  MACHINES="faulks shelley myrinet eaps halem columbia two"  MACHINES="faulks aces eddy bay meander"
183  MACHINES="$MACHINES hopper lomax turing orion bf bs slough sea"  MACHINES="$MACHINES edvir rays1 model columbia"
184  MACHINES="$MACHINES eddy adams dolphin hemmingway altix350 edvir"  MACHINES="$MACHINES xd1 batsi starp"
185    
186  ( cd $INDIR ; ls -1 -t ) > ./dir_all  ( cd $INDIR ; ls -1 -t ) > ./dir_all
187    
# Line 325  for mname in $MACHINES ; do Line 242  for mname in $MACHINES ; do
242          t_pass="--"          t_pass="--"
243          t_tot="--"          t_tot="--"
244          if test -r $dir/summary.txt ; then          if test -r $dir/summary.txt ; then
 #           grep '^[YN] [YN] [YN] [YN] ' $dir/summary.txt > ./all_tests 2>/dev/null  
245              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
246              t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`              t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`
 #           grep '^Y Y Y Y ' ./all_tests > ./all_ran 2>/dev/null  
 #           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 ))  
247              t_pass=`grep 'pass ' ./all_tests | wc -l | sed -e 's| ||g'`              t_pass=`grep 'pass ' ./all_tests | wc -l | sed -e 's| ||g'`
248          fi          fi
 #       rm -f ./all_tests ./all_ran ./all_ran_advect ./all_ran_noadvect  
249          rm -f ./all_tests          rm -f ./all_tests
250          # echo "${dir##*/} : $t_pass out of $t_tot"          # echo "${dir##*/} : $t_pass out of $t_tot"
251    

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.22