/[MITgcm]/mitgcm.org/front_content/make_summary
ViewVC logotype

Annotation of /mitgcm.org/front_content/make_summary

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.32 - (hide annotations) (download)
Tue Dec 25 17:38:26 2007 UTC (17 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.31: +6 -3 lines
new "kind" of test summary: "restart" test added

1 edhill 1.1 #! /usr/bin/env bash
2    
3 jmc 1.32 # $Header: /u/gcmpack/mitgcm.org/front_content/make_summary,v 1.31 2007/09/17 16:01:33 jmc Exp $
4 edhill 1.1 #
5     # The purpose of this script is to create HTML summaries of the
6     # directories produced by the "parse_emails" script.
7    
8    
9     usage()
10     {
11     echo
12     echo "Usage: $0 [OPTIONS]"
13     echo
14     echo "where possible OPTIONS are:"
15     echo " (-help|-h) print usage"
16     echo " (-date |-d )PERIOD run for PERIOD=\"YYYY_MM\""
17     echo " [def=\"$PERIOD\"]"
18     echo
19     exit 1
20     }
21    
22     # defaults
23     PERIOD=`date +%Y`"_"`date +%m`
24    
25     # Parse options
26     ac_prev=
27     for ac_option ; do
28    
29     # If the previous option needs an argument, assign it.
30     if test -n "$ac_prev"; then
31     eval "$ac_prev=\$ac_option"
32     ac_prev=
33     continue
34     fi
35    
36     ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
37    
38     case $ac_option in
39    
40     -help | --help | -h | --h)
41     usage ;;
42    
43     -date | --date | -d | --d)
44     ac_prev=PERIOD ;;
45     --date=* | -date=*)
46     PERIOD=$ac_optarg ;;
47    
48     *)
49     echo "Error: don't understand argument \"$ac_option\""
50     usage
51     ;;
52    
53     esac
54    
55     done
56    
57     INDIR="/u/u0/httpd/html/testing/results/$PERIOD"
58     OUTDIR="/u/u0/httpd/html/testing/summary"
59     OUTFILE=$OUTDIR"/summary_"$PERIOD".html"
60    
61     # Create the "latest" links
62     echo "Creating the \"latest\" file for each machine: "
63     LATEST=$OUTDIR"/latest_"$PERIOD".html"
64 edhill 1.5 the_date=`date`
65 edhill 1.1 cat > $LATEST << EOF
66     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
67     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
68    
69     <html xmlns="http://www.w3.org/1999/xhtml">
70     <head>
71     <title>MITgcm testing summary</title>
72     <meta name="author" content="Ed Hill" />
73    
74     <!-- <base href="http://mitgcm.org/testing/summary/" /> -->
75    
76     <!-- Hinting for menu generation -->
77 edhill 1.8 <meta name="add_name_0" content="Testing" />
78     <meta name="add_name_1" content="" />
79 edhill 1.1 <meta name="add_name_2" content="" />
80     <meta name="add_title" content="Testing" />
81     <!-- Hinting for menu generation -->
82    
83     </head>
84     <body>
85 edhill 1.3 <p>The MITgcm model is tested
86 edhill 1.2 (compiled and run) in an automated fashion on a varirety of
87     different machines. The following is a summary of the MITgcm
88 edhill 1.3 verification suite for the time period: <b>$PERIOD</b>.</p>
89 edhill 1.2
90     <p>The machine naming scheme is:<br /></p>
91     <table align="center" cellpadding="0" border="0">
92 edhill 1.4 <tr bgcolor="#00cccc"> <td><b>Machine Type</b></td> <td><b>Nickname</b></td>
93 edhill 1.1 <td><b>Notes</b></td> </tr>
94    
95 edhill 1.2 <tr bgcolor="#bbffdd"> <td>Intel P4</td> <td>"faulks"</td>
96 edhill 1.24 <td>Fedora Core 3 </td> </tr>
97 edhill 1.13 <tr bgcolor="#bbddff"> <td>Intel P4</td> <td>"hemmingway"</td>
98 edhill 1.24 <td>Fedora Core 3</td> </tr>
99 edhill 1.2
100     <tr bgcolor="#bbffdd"> <td> Intel P3/P4 Beowulf </td> <td>"myrinet"</td>
101     <td><a href="http://mitgcm.org/projects/MITGCM_CLUSTER/">MITgcm cluster
102     facility </a></td> </tr>
103 edhill 1.1 <tr bgcolor="#bbddff"> <td>Alpha cluster</td> <td>"halem"</td>
104 edhill 1.14 <td><a href="http://nccstag.gsfc.nasa.gov/halem/quickstart_halem.html">
105 edhill 1.1 NASA NCCS Halem</a></td> </tr>
106    
107 edhill 1.24 <!--
108 edhill 1.1 <tr bgcolor="#bbffdd"> <td> SGI Origin 2000 </td> <td>"hopper"</td>
109     <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O2K/o2k.html">
110     NAS SGI Origin 2000 </a></td> </tr>
111 edhill 1.24 <tr bgcolor="#bbddff"> <td> SGI Origin 3000</td><td>"lomax"/"turing"</td>
112 edhill 1.1 <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O3K/o3k.html">
113     NAS SGI Origin 3000 </a></td> </tr>
114 edhill 1.24 -->
115 edhill 1.1
116 edhill 1.24 <!--
117     <tr bgcolor="#bbffdd"> <td> SGI Altix </td> <td>"orion"</td>
118 edhill 1.1 <td><a href="http://sc.jpl.nasa.gov/">JPL Supercomputing and
119 edhill 1.24 Visualization Facility</a></td> </tr>
120     -->
121 edhill 1.18 <tr bgcolor="#bbffdd"> <td> SGI Altix 350 </td> <td>"altix350"</td>
122     <td><a href="http://acesgrid.org/geocluster/">MIT ACESgrid
123     GeoCluster</a></td> </tr>
124 edhill 1.1 <tr bgcolor="#bbddff"> <td> IBM POWER3 SP </td> <td>"bf"</td>
125     <td><a href="http://www.scd.ucar.edu/computers/blackforest/">NCAR Blackforest
126     </a></td> </tr>
127    
128     <tr bgcolor="#bbffdd"> <td> IBM POWER4 SP </td> <td>"bs"</td>
129     <td><a href="http://www.scd.ucar.edu/computers/bluesky/">NCAR Bluesky
130     </a></td> </tr>
131 edhill 1.9 <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"adams"</td>
132 edhill 1.24 <td>Fedora Core 4 (AMD64)</td> </tr>
133 edhill 1.1
134 edhill 1.6 <tr bgcolor="#bbffdd"> <td> Sun UltraSparc </td> <td>"slough"</td>
135     <td>Solaris 8</td> </tr>
136     <tr bgcolor="#bbddff"> <td> Intel P4 Mosix Cluster </td> <td>"sea"</td>
137     <td>Red Hat v7.2</td> </tr>
138    
139 edhill 1.28 <tr bgcolor="#bbffdd"> <td> Intel P4</td> <td>"eddy"</td>
140     <td>Fedora Core 5</td> </tr>
141 edhill 1.11 <tr bgcolor="#bbddff"> <td> AMD Opteron cluster </td> <td>"dolphin"</td>
142     <td>SuSE SLES v8.1</td> </tr>
143 edhill 1.9
144 edhill 1.23 <tr bgcolor="#bbffdd"> <td> IBM/Apple dual G5 </td> <td>"two"</td>
145     <td>Mac OSX 10.3 (gcc 3.4) </td> </tr>
146    
147 edhill 1.24 <tr bgcolor="#bbddff"> <td> <a href="http://acesgrid.org">ACESgrid Dell
148 edhill 1.29 Xeon</a> </td> <td>"aces"</td><td>Fedora Core 2</td> </tr>
149 edhill 1.24
150 edhill 1.13 <!--
151    
152 edhill 1.12 <tr bgcolor="#bbffdd"> <td> Intel P4 </td> <td>"hemmingway"</td>
153     <td>Fedora Core release 1 (gcc 3.3.2) </td> </tr>
154    
155 edhill 1.1 <tr bgcolor="#bbddff"> <td> </td> <td>""</td>
156     <td></td> </tr>
157     -->
158    
159     </table>
160 edhill 1.2
161     <p><br />
162 edhill 1.3 The complete output for the verification runs can be found in
163 edhill 1.5 <a href="http://mitgcm.org/testing/summary/">the summary pages</a>
164     and the <a href="http://mitgcm.org/testing/results/">testing archives</a>.
165 edhill 1.2 The latest reports are:</p>
166 edhill 1.1 <table align="center" cellpadding="0" cellspacing="0" border="0" width="95%">
167     <tr bgcolor="#00cccc">
168 edhill 1.4 <td height="0"> <b>Nickname</b> </td>
169 edhill 1.1 <td> <b>OPTFILE Name</b> </td>
170 edhill 1.4 <td> <b>Type</b> </td>
171 edhill 1.5 <td> <b>Date</b> </td>
172 edhill 1.4 <td> <b>Summary</b> </td>
173 edhill 1.6 <td> <b>Ratio</b> </td>
174 edhill 1.1 </tr>
175    
176     EOF
177    
178     color="#bbffdd"
179 edhill 1.10 ncolor="#bbddff"
180 edhill 1.1 res_url="http://mitgcm.org/testing/"
181    
182 jmc 1.31 MACHINES="faulks aces eddy bay meander"
183     MACHINES="$MACHINES edvir rays1 model columbia"
184     MACHINES="$MACHINES xd1 batsi starp"
185 edhill 1.1
186 edhill 1.17 ( cd $INDIR ; ls -1 -t ) > ./dir_all
187 edhill 1.1
188 edhill 1.20 MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
189     for madd in $MALL ; do
190     present=0
191     for m in $MACHINES ; do
192     echo $madd | grep $m > /dev/null 2>&1
193     RETVAL=$?
194     test $RETVAL = 0 && present=1
195     continue
196     done
197     test $present = 0 && MACHINES="$MACHINES $madd"
198     done
199    
200 edhill 1.1 for mname in $MACHINES ; do
201    
202     echo " $mname"
203    
204     dir_list=`grep $mname ./dir_all`
205     echo -n "" > ./mlist
206    
207     for i in $dir_list ; do
208    
209     dir=$INDIR"/"$i
210     OPTFILE=
211     if test -r $dir/summary.txt ; then
212     comm=`grep 'OPTFILE=' $dir/summary.txt`
213     eval $comm
214     OPTFILE=${OPTFILE##*/}
215     fi
216     if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then
217 edhill 1.3 comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null`
218 edhill 1.1 eval $comm
219     OPTFILE=${OPTFILE##*/}
220     fi
221     if test "x$OPTFILE" = x ; then
222 edhill 1.21 comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1`
223 edhill 1.3 comm=${comm##*#}
224 edhill 1.1 eval $comm
225     OPTFILE=${OPTFILE##*/}
226     fi
227     if test "x$OPTFILE" = x ; then
228     OPTFILE="not_explicitly_specified"
229     fi
230 edhill 1.4
231     ADJOINT=
232 jmc 1.32 RESTART=0
233 edhill 1.4 if test -r $dir/summary.txt ; then
234     comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
235     eval $comm
236 jmc 1.32 RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
237 edhill 1.4 fi
238 jmc 1.32 if test "x$RESTART" = x0 ; then
239 edhill 1.4 kind="forward"
240 jmc 1.32 test "x$ADJOINT" = xtrue && kind="adjoint"
241 edhill 1.4 else
242 jmc 1.32 kind="restart"
243 edhill 1.4 fi
244    
245 edhill 1.6 t_pass="--"
246     t_tot="--"
247     if test -r $dir/summary.txt ; then
248 jmc 1.30 grep '^[YN] [YN] [YN] [YN]' $dir/summary.txt > ./all_tests 2>/dev/null
249 edhill 1.6 t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`
250 jmc 1.30 t_pass=`grep 'pass ' ./all_tests | wc -l | sed -e 's| ||g'`
251 edhill 1.6 fi
252 jmc 1.30 rm -f ./all_tests
253 edhill 1.6 # echo "${dir##*/} : $t_pass out of $t_tot"
254    
255 edhill 1.1 tokens=`echo $i | sed -e 's|_| |g'`
256     echo "" > ./ms_tmp
257     for tok in $tokens ; do
258     echo $tok >> ./ms_tmp
259     done
260     DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'`
261     rm -f ./ms_tmp
262 edhill 1.4
263 edhill 1.6 echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist
264 edhill 1.1
265     done
266    
267     # helpful for debugging
268     # cat ./mlist
269    
270     # Do we have any data? If so, create the latest pointer.
271     num=`wc -l ./mlist | awk '{print $1}'`
272     if test $num -gt 0 ; then
273 edhill 1.10
274     # swap colors
275     ctmp=$color
276     color=$ncolor
277     ncolor=$ctmp
278    
279 edhill 1.4 keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`
280 edhill 1.1
281 edhill 1.4 for key in $keys ; do
282 edhill 1.17 tline=`grep "^$key " ./mlist | head -1`
283 edhill 1.6 ratio=`echo $tline | cut -d " " -f 6`
284 edhill 1.4 ldir=`echo $tline | cut -d " " -f 5`
285     kind=`echo $tline | cut -d " " -f 4`
286     optf=`echo $tline | cut -d " " -f 3`
287     DAY=`echo $tline | cut -d " " -f 2`
288 edhill 1.1 URL="results/$PERIOD/$ldir"
289     cat <<EOF >>$LATEST
290     <tr bgcolor="$color">
291 edhill 1.4 <td height="0"> $mname </td>
292 edhill 1.1 <td> $optf </td>
293 edhill 1.4 <td> $kind </td>
294     <td> <a href="$res_url$URL">$DAY</a> </td>
295     <td> <a href="$res_url$URL/summary.txt"> summary.txt </a> </td>
296 edhill 1.6 <td> $ratio </td>
297 edhill 1.1 </tr>
298     EOF
299     done
300     fi
301    
302     done
303    
304     cat >> $LATEST << EOF
305 edhill 1.5 <tr bgcolor="#00cccc">
306 edhill 1.6 <td height="0" colspan="6" align="center" >This table generated on: $the_date</td>
307     </tr>
308 edhill 1.1
309     </table>
310 edhill 1.6
311 edhill 1.26 <p>Examples of the scripts used for these testing runs can be obtained from: <a
312     href="http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/tools/example_scripts/">
313     MITgcm/tools/example_scripts</a>.</p>
314 edhill 1.6
315    
316 edhill 1.1 </body>
317     </html>
318    
319     EOF
320    
321     rm -f ./dir_all ./mlist
322    
323     CURR_PER=`date +%Y`"_"`date +%m`
324     if test "x$PERIOD" = "x$CURR_PER" ; then
325 edhill 1.2 cp $LATEST ./testing.xml
326 edhill 1.1 (
327     cd $OUTDIR
328     rm -f latest.html
329     ln -s $LATEST latest.html
330     )
331     fi

  ViewVC Help
Powered by ViewVC 1.1.22