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

Contents of /mitgcm.org/front_content/make_summary

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


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

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/mitgcm.org/front_content/make_summary,v 1.31 2007/09/17 16:01:33 jmc Exp $
4 #
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 the_date=`date`
65 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 <meta name="add_name_0" content="Testing" />
78 <meta name="add_name_1" content="" />
79 <meta name="add_name_2" content="" />
80 <meta name="add_title" content="Testing" />
81 <!-- Hinting for menu generation -->
82
83 </head>
84 <body>
85 <p>The MITgcm model is tested
86 (compiled and run) in an automated fashion on a varirety of
87 different machines. The following is a summary of the MITgcm
88 verification suite for the time period: <b>$PERIOD</b>.</p>
89
90 <p>The machine naming scheme is:<br /></p>
91 <table align="center" cellpadding="0" border="0">
92 <tr bgcolor="#00cccc"> <td><b>Machine Type</b></td> <td><b>Nickname</b></td>
93 <td><b>Notes</b></td> </tr>
94
95 <tr bgcolor="#bbffdd"> <td>Intel P4</td> <td>"faulks"</td>
96 <td>Fedora Core 3 </td> </tr>
97 <tr bgcolor="#bbddff"> <td>Intel P4</td> <td>"hemmingway"</td>
98 <td>Fedora Core 3</td> </tr>
99
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 <tr bgcolor="#bbddff"> <td>Alpha cluster</td> <td>"halem"</td>
104 <td><a href="http://nccstag.gsfc.nasa.gov/halem/quickstart_halem.html">
105 NASA NCCS Halem</a></td> </tr>
106
107 <!--
108 <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 <tr bgcolor="#bbddff"> <td> SGI Origin 3000</td><td>"lomax"/"turing"</td>
112 <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O3K/o3k.html">
113 NAS SGI Origin 3000 </a></td> </tr>
114 -->
115
116 <!--
117 <tr bgcolor="#bbffdd"> <td> SGI Altix </td> <td>"orion"</td>
118 <td><a href="http://sc.jpl.nasa.gov/">JPL Supercomputing and
119 Visualization Facility</a></td> </tr>
120 -->
121 <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 <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 <tr bgcolor="#bbddff"> <td> AMD Opteron </td> <td>"adams"</td>
132 <td>Fedora Core 4 (AMD64)</td> </tr>
133
134 <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 <tr bgcolor="#bbffdd"> <td> Intel P4</td> <td>"eddy"</td>
140 <td>Fedora Core 5</td> </tr>
141 <tr bgcolor="#bbddff"> <td> AMD Opteron cluster </td> <td>"dolphin"</td>
142 <td>SuSE SLES v8.1</td> </tr>
143
144 <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 <tr bgcolor="#bbddff"> <td> <a href="http://acesgrid.org">ACESgrid Dell
148 Xeon</a> </td> <td>"aces"</td><td>Fedora Core 2</td> </tr>
149
150 <!--
151
152 <tr bgcolor="#bbffdd"> <td> Intel P4 </td> <td>"hemmingway"</td>
153 <td>Fedora Core release 1 (gcc 3.3.2) </td> </tr>
154
155 <tr bgcolor="#bbddff"> <td> </td> <td>""</td>
156 <td></td> </tr>
157 -->
158
159 </table>
160
161 <p><br />
162 The complete output for the verification runs can be found in
163 <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 The latest reports are:</p>
166 <table align="center" cellpadding="0" cellspacing="0" border="0" width="95%">
167 <tr bgcolor="#00cccc">
168 <td height="0"> <b>Nickname</b> </td>
169 <td> <b>OPTFILE Name</b> </td>
170 <td> <b>Type</b> </td>
171 <td> <b>Date</b> </td>
172 <td> <b>Summary</b> </td>
173 <td> <b>Ratio</b> </td>
174 </tr>
175
176 EOF
177
178 color="#bbffdd"
179 ncolor="#bbddff"
180 res_url="http://mitgcm.org/testing/"
181
182 MACHINES="faulks aces eddy bay meander"
183 MACHINES="$MACHINES edvir rays1 model columbia"
184 MACHINES="$MACHINES xd1 batsi starp"
185
186 ( cd $INDIR ; ls -1 -t ) > ./dir_all
187
188 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 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 comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null`
218 eval $comm
219 OPTFILE=${OPTFILE##*/}
220 fi
221 if test "x$OPTFILE" = x ; then
222 comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1`
223 comm=${comm##*#}
224 eval $comm
225 OPTFILE=${OPTFILE##*/}
226 fi
227 if test "x$OPTFILE" = x ; then
228 OPTFILE="not_explicitly_specified"
229 fi
230
231 ADJOINT=
232 RESTART=0
233 if test -r $dir/summary.txt ; then
234 comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
235 eval $comm
236 RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
237 fi
238 if test "x$RESTART" = x0 ; then
239 kind="forward"
240 test "x$ADJOINT" = xtrue && kind="adjoint"
241 else
242 kind="restart"
243 fi
244
245 t_pass="--"
246 t_tot="--"
247 if test -r $dir/summary.txt ; then
248 grep '^[YN] [YN] [YN] [YN]' $dir/summary.txt > ./all_tests 2>/dev/null
249 t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`
250 t_pass=`grep 'pass ' ./all_tests | wc -l | sed -e 's| ||g'`
251 fi
252 rm -f ./all_tests
253 # echo "${dir##*/} : $t_pass out of $t_tot"
254
255 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
263 echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist
264
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
274 # swap colors
275 ctmp=$color
276 color=$ncolor
277 ncolor=$ctmp
278
279 keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`
280
281 for key in $keys ; do
282 tline=`grep "^$key " ./mlist | head -1`
283 ratio=`echo $tline | cut -d " " -f 6`
284 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 URL="results/$PERIOD/$ldir"
289 cat <<EOF >>$LATEST
290 <tr bgcolor="$color">
291 <td height="0"> $mname </td>
292 <td> $optf </td>
293 <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 <td> $ratio </td>
297 </tr>
298 EOF
299 done
300 fi
301
302 done
303
304 cat >> $LATEST << EOF
305 <tr bgcolor="#00cccc">
306 <td height="0" colspan="6" align="center" >This table generated on: $the_date</td>
307 </tr>
308
309 </table>
310
311 <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
315
316 </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 cp $LATEST ./testing.xml
326 (
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