/[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

--- mitgcm.org/front_content/make_summary	2003/12/09 18:35:57	1.5
+++ mitgcm.org/front_content/make_summary	2003/12/10 03:12:11	1.6
@@ -1,6 +1,6 @@
 #! /usr/bin/env bash
 
-# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/front_content/make_summary,v 1.5 2003/12/09 18:35:57 edhill Exp $
+# $Header: /home/ubuntu/mnt/e9_copy/mitgcm.org/front_content/make_summary,v 1.6 2003/12/10 03:12:11 edhill Exp $
 #
 #  The purpose of this script is to create HTML summaries of the
 #  directories produced by the "parse_emails" script.
@@ -19,6 +19,89 @@
     exit 1
 }
 
+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"
+}
+
+
 # defaults
 PERIOD=`date +%Y`"_"`date +%m`
 
@@ -58,88 +141,6 @@
 OUTDIR="/u/u0/httpd/html/testing/summary"
 OUTFILE=$OUTDIR"/summary_"$PERIOD".html"
 
-
-#  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"
-
-
 #  Create the "latest" links
 echo "Creating the \"latest\" file for each machine: "
 LATEST=$OUTDIR"/latest_"$PERIOD".html"
@@ -206,6 +207,11 @@
       <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"eaps"</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="#bbddff"> <td>  </td> <td>""</td>
         <td></td> </tr>
@@ -225,6 +231,7 @@
   <td> <b>Type</b> </td>
   <td> <b>Date</b> </td>
   <td> <b>Summary</b> </td>
+  <td> <b>Ratio</b> </td>
 </tr>
 
 EOF
@@ -232,7 +239,7 @@
 color="#bbffdd"
 res_url="http://mitgcm.org/testing/"
 
-MACHINES="faulks shelley myrinet eaps halem hopper lomax orion bf bs"
+MACHINES="faulks shelley myrinet eaps halem hopper lomax orion bf bs slough sea"
 
 ( cd $INDIR ; ls -1 ) > ./dir_all
 
@@ -283,6 +290,26 @@
 	    test "x$ADJOINT" = xtrue  &&  kind="adjoint"
 	fi
 
+	t_pass="--"
+	t_tot="--"
+	if test -r $dir/summary.txt ; then
+	    grep '^[YN] [YN] [YN] [YN] ' $dir/summary.txt > ./all_tests 2>/dev/null
+	    t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`
+	    grep '^Y Y Y Y ' ./all_tests > ./all_ran 2>/dev/null
+	    t_advect=`grep advect_ ./all_ran 2>/dev/null | wc -l | sed -e 's| ||g'`
+	    t_advect=${t_advect/ /}
+	    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 ))
+	fi
+	rm -f ./all_tests ./all_ran ./all_ran_noadvect
+	# echo "${dir##*/} : $t_pass out of $t_tot"
+
 	tokens=`echo $i | sed -e 's|_| |g'`
 	echo "" > ./ms_tmp
 	for tok in $tokens ; do
@@ -291,7 +318,7 @@
 	DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'`
 	rm -f ./ms_tmp
 
-	echo "$OPTFILE$kind $DAY $OPTFILE $kind $i" >> ./mlist
+	echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist
 
     done
 
@@ -305,6 +332,7 @@
 
 	for key in $keys ; do
 	    tline=`grep "^$key " ./mlist | sort -r | head -1`
+	    ratio=`echo $tline | cut -d " " -f 6`
 	    ldir=`echo $tline | cut -d " " -f 5`
 	    kind=`echo $tline | cut -d " " -f 4`
 	    optf=`echo $tline | cut -d " " -f 3`
@@ -317,6 +345,7 @@
   <td> $kind </td>
   <td> <a href="$res_url$URL">$DAY</a> </td>
   <td> <a href="$res_url$URL/summary.txt"> summary.txt </a> </td>
+  <td> $ratio </td>
 </tr>
 EOF
 	done
@@ -326,12 +355,17 @@
 
 cat >> $LATEST << EOF
 <tr bgcolor="#00cccc">
-  <td height="0" colspan="5" align="center" >
-    === This table generated on: $the_date ===
-  </td>     
-</tr>       
+  <td height="0" colspan="6" align="center" >This table generated on: $the_date</td>
+</tr>
 
     </table>
+
+<p>Examples of the scripts used for these testing runs can be obtained
+from <a
+href="http://dev.mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm_contrib/test_scripts/">
+the "contrib" area of the MITgcm CVS archive</a>.</p>
+
+
   </body>
 </html>
 

 

  ViewVC Help
Powered by ViewVC 1.1.22