/[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.53 - (show annotations) (download)
Mon Jun 22 23:09:05 2009 UTC (14 years, 11 months ago) by jmc
Branch: MAIN
Changes since 1.52: +2 -2 lines
updated

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/mitgcm.org/front_content/make_summary,v 1.52 2009/06/22 20:23:48 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 CURR_PER=`date +%Y`"_"`date +%m`
23 # defaults
24 PERIOD=$CURR_PER
25
26 # Parse options
27 ac_prev=
28 for ac_option ; do
29
30 # If the previous option needs an argument, assign it.
31 if test -n "$ac_prev"; then
32 eval "$ac_prev=\$ac_option"
33 ac_prev=
34 continue
35 fi
36
37 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
38
39 case $ac_option in
40
41 -help | --help | -h | --h)
42 usage ;;
43
44 -date | --date | -d | --d)
45 ac_prev=PERIOD ;;
46 --date=* | -date=*)
47 PERIOD=$ac_optarg ;;
48
49 *)
50 echo "Error: don't understand argument \"$ac_option\""
51 usage
52 ;;
53
54 esac
55
56 done
57
58 #INDIR="/net/orwell/export/export-9/mitgcm-testing/results/$PERIOD"
59 #OUTDIR="/home/jmc/mitgcm/test_web/summary"
60 INDIR="/u/u0/httpd/html/testing/results/$PERIOD"
61 OUTDIR="/u/u0/httpd/html/testing/summary"
62
63 OUTFILE=$OUTDIR"/output_"$PERIOD".html"
64 res_url="http://mitgcm.org/testing/"
65
66 # Create the links in $OUTFILE :
67 echo "Creating the \"latest\" file for each machine: "
68 the_date=`date`
69 cat > $OUTFILE << EOF
70 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
71 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
72
73 <html xmlns="http://www.w3.org/1999/xhtml">
74 <head>
75 <title>MITgcm testing summary</title>
76 <meta name="author" content="Ed Hill" />
77
78 <!-- <base href="http://mitgcm.org/testing/summary/" /> -->
79
80 <!-- Hinting for menu generation -->
81 <meta name="add_name_0" content="Testing" />
82 <meta name="add_name_1" content="" />
83 <meta name="add_name_2" content="" />
84 <meta name="add_title" content="Testing" />
85 <!-- Hinting for menu generation -->
86
87 </head>
88 <body>
89 <p>The MITgcm model is tested
90 (compiled and run) in an automated fashion on a varirety of
91 different machines. The following is a summary of the MITgcm
92 verification suite for the time period: <b>$PERIOD</b>.</p>
93
94 <p>The machine naming scheme is:<br /></p>
95 <table align="center" cellpadding="0" border="0">
96 <tr bgcolor="#00cccc"> <td><b>Machine Type</b></td> <td><b>Nickname</b></td>
97 <td><b>Notes</b></td> </tr>
98
99 <tr bgcolor="#bbddff">
100 <td>Intel P4</td> <td>"faulks"</td> <td>Fedora Core 6 </td> </tr>
101 <tr bgcolor="#bbffdd">
102 <td> Intel P4 </td> <td>"meander"</td> <td>Ubuntu 8.10 </td> </tr>
103 <tr bgcolor="#bbddff">
104 <td> Intel P4 </td> <td>"lagoon"</td> <td>Fedora 8 </td> </tr>
105 <tr bgcolor="#bbffdd">
106 <td> Opteron Barcelona </td> <td>"harbor"</td> <td>Ubuntu 8.04 LTS (x86_64)</td> </tr>
107 <tr bgcolor="#bbddff">
108 <td> Intel Xeon (Woodcrest) </td> <td>"dickens"</td> <td>Fedora 10 (x86_64)</td> </tr>
109 <tr bgcolor="#bbffdd">
110 <td> Intel Core 2 duo </td> <td>"danton"</td> <td>Fedora 8 (x86_64)</td> </tr>
111
112 <tr bgcolor="#bbddff">
113 <td> <a href="http://acesgrid.org">ACESgrid Dell Xeon</a> </td>
114 <td>"aces"</td><td>Fedora Core 2</td> </tr>
115
116 <tr bgcolor="#bbffdd">
117 <td><a href="http://www.darwinproject.mit.edu/wiki/">Intel Xeon (Woodcrest) cluster</a>
118 </td> <td>"beagle"</td><td>Rocks 5.2 (x86_64)</td> </tr>
119
120 <!--
121 <tr bgcolor="#bbffdd">
122 <td> Intel P3/P4 Beowulf </td> <td>"myrinet"</td>
123 <td><a href="http://mitgcm.org/projects/MITGCM_CLUSTER/">MITgcm cluster
124 facility </a></td> </tr>
125 <tr bgcolor="#bbddff">
126 <td>Alpha cluster</td> <td>"halem"</td>
127 <td><a href="http://nccstag.gsfc.nasa.gov/halem/quickstart_halem.html">
128 NASA NCCS Halem</a></td> </tr>
129 <tr bgcolor="#bbffdd">
130 <td> SGI Origin 2000 </td> <td>"hopper"</td>
131 <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O2K/o2k.html">
132 NAS SGI Origin 2000 </a></td> </tr>
133 <tr bgcolor="#bbddff">
134 <td> SGI Origin 3000</td><td>"lomax"/"turing"</td>
135 <td><a href="http://www.nas.nasa.gov/User/Systemsdocs/O3K/o3k.html">
136 NAS SGI Origin 3000 </a></td> </tr>
137 -->
138
139 <tr bgcolor="#bbddff">
140 <td> SGI Altix Cluster </td> <td>"columbia"</td>
141 <td><a href="http://www.nas.nasa.gov/Resources/Systems/columbia.html">
142 NAS Columbia </a></td> </tr>
143
144 <tr bgcolor="#bbffdd">
145 <td> IBM POWER4 SP </td> <td>"edvir"</td> <td> AIX 5.2 </td> </tr>
146 <tr bgcolor="#bbddff">
147 <td> IBM POWER5+ SP </td> <td>"blueice"</td>
148 <td><a href="http://www.scd.ucar.edu/computers/blueice/">NCAR Blueice
149 </a></td> </tr>
150
151 <tr bgcolor="#bbffdd">
152 <td> AMD Opteron </td> <td>"starp"</td> <td>SuSE SLES 10 (AMD64)</td> </tr>
153
154 <tr bgcolor="#bbddff">
155 <td> AMD Opteron </td> <td>"solasrv"</td> <td>Solaris 10</td> </tr>
156 <tr bgcolor="#bbffdd">
157 <td> Sun UltraSparc IV </td> <td>"rays"</td> <td>Solaris 10</td> </tr>
158 <!--
159 <td> Sun UltraSparc IV </td> <td>"solssrv"</td> <td>Solaris 10</td> </tr>
160 <td> Sun UltraSparc IV </td> <td>"model"</td> <td>Solaris 9</td> </tr>
161 -->
162 <tr bgcolor="#bbddff">
163 <td> NEC SX-8 </td> <td>"sx8"</td> <td>Super-UX </td> </tr>
164 <tr bgcolor="#bbffdd">
165 <td> Cray XD1 (AMD Opteron) </td> <td>"xd1"</td>
166 <td>Cray HPC enhanced Linux 2.6.5 </td> </tr>
167 <tr bgcolor="#bbddff">
168 <td> PowerPC970MP cluster </td> <td>"bigred"</td>
169 <td>SuSE SLES 9 (PPC) </td> </tr>
170
171 <!--
172 <tr bgcolor="#bbffdd">
173 <td><a href="http://www.testdrive.hp.com/current.shtml"> HP test-drive </a>
174 (Pentium III) </td> <td>"td152"</td> <td> FreeBSD 6.2 </td> </tr>
175 <tr bgcolor="#bbddff">
176 <td><a href="http://www.testdrive.hp.com/current.shtml"> HP test-drive </a>
177 (Itanium II) </td> <td>"td187"</td> <td>SuSE SLES 10 </td> </tr>
178 <tr bgcolor="#bbffdd">
179 <td><a href="http://www.testdrive.hp.com/current.shtml"> HP test-drive </a>
180 (PA-RISC 8900) </td> <td>"td191"</td> <td> HP-UX 11i 11.11 </td> </tr>
181 <tr bgcolor="#bbddff">
182 <td><a href="http://www.testdrive.hp.com/current.shtml"> HP test-drive </a>
183 (Itanium II) </td> <td>"td194"</td> <td> HP-UX 11i v3 </td> </tr>
184 <tr bgcolor="#bbffdd">
185 -->
186
187 <!--
188 <tr bgcolor="#bbddff"> <td> </td> <td>""</td>
189 <td></td> </tr>
190 -->
191
192 </table>
193
194 <p><br />
195 The complete output for the verification runs can be found in
196 <a href="http://mitgcm.org/testing/summary/">the summary pages</a>
197 and the <a href="http://mitgcm.org/testing/results/">testing archives</a>.
198 The latest reports are:</p>
199 <table align="center" cellpadding="0" cellspacing="0" border="0" width="95%">
200 <tr bgcolor="#00cccc">
201 <td height="0"> <b>Nickname</b> </td>
202 <td> <b>OPTFILE Name</b> </td>
203 <td> <b>Type</b> </td>
204 <td> <b>Date</b> </td>
205 <td> <b>Summary</b> </td>
206 <td> <b>Ratio</b> </td>
207 </tr>
208
209 EOF
210
211 color="#bbffdd"
212 ncolor="#bbddff"
213
214 MACHINES="faulks meander lagoon harbor dickens danton aces"
215 MACHINES="$MACHINES beagle columbia edvir rays solssrv solasrv sx8 xd1"
216 MACHINES="$MACHINES bigred starp"
217
218 ( cd $INDIR ; ls -1 -t */summary.txt | sed 's/\/summary.txt//' ) > ./dir_all
219
220 MALL=`cat ./dir_all | sed -e 's|_| |g' | awk '{print $2}' | sort | uniq`
221 for madd in $MALL ; do
222 present=0
223 for m in $MACHINES ; do
224 echo $madd | grep $m > /dev/null 2>&1
225 RETVAL=$?
226 test $RETVAL = 0 && present=1
227 continue
228 done
229 test $present = 0 && MACHINES="$MACHINES $madd"
230 done
231 #MACHINES="faulks"
232
233 for mname in $MACHINES ; do
234
235 echo " $mname"
236
237 dir_list=`grep $mname ./dir_all`
238 echo -n "" > ./mlist
239
240 for i in $dir_list ; do
241
242 dir=$INDIR"/"$i
243 OPTFILE=
244 if test -r $dir/summary.txt ; then
245 comm=`grep 'OPTFILE=' $dir/summary.txt`
246 eval $comm
247 OPTFILE=${OPTFILE##*/}
248 fi
249 if test "x$OPTFILE" = x -a -r "$dir/genmake_state" ; then
250 comm=`grep 'OPTFILE=' $dir/genmake_state 2>/dev/null`
251 eval $comm
252 OPTFILE=${OPTFILE##*/}
253 fi
254 if test "x$OPTFILE" = x ; then
255 comm=`grep '^# OPTFILE=' $dir/*/Makefile* 2>/dev/null | head -1`
256 comm=${comm##*#}
257 eval $comm
258 OPTFILE=${OPTFILE##*/}
259 fi
260 if test "x$OPTFILE" = x ; then
261 OPTFILE="not_explicitly_specified"
262 fi
263
264 ADJOINT=
265 RESTART=0
266 NOI3E=0
267 MTH=0
268 if test -r $dir/summary.txt ; then
269 comm=`grep 'ADJOINT=true' $dir/summary.txt 2>/dev/null`
270 eval $comm
271 RESTART=`grep -c 'test 2+2=4 summary' $dir/summary.txt`
272 NOI3E=`grep -c "^run: .*testreport.* '*-noieee'* " $dir/summary.txt`
273 MTH=`grep -c "^run: .*testreport.* -mth " $dir/summary.txt`
274 fi
275 if test "x$RESTART" = x0 ; then
276 kind="forward"
277 test "x$ADJOINT" = xtrue && kind="adjoint"
278 else
279 kind="restart"
280 fi
281 if test "x$NOI3E" = x1 ; then
282 OPTFILE="${OPTFILE}.noieee"
283 fi
284 if test "x$MTH" = x1 ; then
285 yy=`echo $OPTFILE | grep -c 'mth$'`
286 if test $yy = 0 ; then OPTFILE="${OPTFILE}+mth" ; fi
287 fi
288
289 t_pass="--"
290 t_tot="--"
291 if test -r $dir/summary.txt ; then
292 grep '^[YN] [YN] [YN] [YN]' $dir/summary.txt > ./all_tests 2>/dev/null
293 t_tot=`cat ./all_tests | wc -l | sed -e 's| ||g'`
294 t_pass=`grep '^Y Y Y Y' ./all_tests | grep 'pass ' | wc -l | sed -e 's| ||g'`
295 fi
296 rm -f ./all_tests
297 # echo "${dir##*/} : $t_pass out of $t_tot"
298
299 tokens=`echo $i | sed -e 's|_| |g'`
300 echo "" > ./ms_tmp
301 for tok in $tokens ; do
302 echo $tok >> ./ms_tmp
303 done
304 DAY=`cat ./ms_tmp | awk '(length($1)==8 && substr($1,0,3)=="200")'`
305 rm -f ./ms_tmp
306
307 echo "$OPTFILE$kind $DAY $OPTFILE $kind $i $t_pass:$t_tot" >> ./mlist
308
309 done
310
311 # helpful for debugging
312 # cat ./mlist
313
314 # Do we have any data? If so, create the latest pointer.
315 num=`wc -l ./mlist | awk '{print $1}'`
316 if test $num -gt 0 ; then
317
318 # swap colors
319 ctmp=$color
320 color=$ncolor
321 ncolor=$ctmp
322
323 keys=`cat ./mlist | cut -d " " -f 1 | sort | uniq`
324
325 for key in $keys ; do
326 tline=`grep "^$key " ./mlist | head -1`
327 ratio=`echo $tline | cut -d " " -f 6`
328 ldir=`echo $tline | cut -d " " -f 5`
329 kind=`echo $tline | cut -d " " -f 4`
330 optf=`echo $tline | cut -d " " -f 3`
331 DAY=`echo $tline | cut -d " " -f 2`
332 URL="results/$PERIOD/$ldir"
333 cat <<EOF >>$OUTFILE
334 <tr bgcolor="$color">
335 <td height="0"> $mname </td>
336 <td> $optf </td>
337 <td> $kind </td>
338 <td> <a href="$res_url$URL">$DAY</a> </td>
339 <td> <a href="$res_url$URL/summary.txt"> summary.txt </a> </td>
340 <td> $ratio </td>
341 </tr>
342 EOF
343 done
344 fi
345
346 done
347
348 cat >> $OUTFILE << EOF
349 <tr bgcolor="#00cccc">
350 <td height="0" colspan="6" align="center" >This table generated on: $the_date</td>
351 </tr>
352
353 </table>
354
355 <p>Examples of the scripts used for these testing runs can be obtained from: <a
356 href="http://mitgcm.org/cgi-bin/viewcvs.cgi/MITgcm/tools/example_scripts/">
357 MITgcm/tools/example_scripts</a>.</p>
358
359
360 </body>
361 </html>
362
363 EOF
364
365 rm -f ./dir_all ./mlist
366
367 #- put the file in place
368 chgrp gcmpack $OUTFILE
369 chmod 664 $OUTFILE
370 LATEST=$OUTDIR"/latest_"$PERIOD".html"
371 mv -f $OUTFILE $LATEST
372
373 if test "x$PERIOD" = "x$CURR_PER" ; then
374 cp $LATEST ./testing.xml
375 (
376 cd $OUTDIR
377 rm -f latest.html
378 ln -s $LATEST latest.html
379 )
380 fi

  ViewVC Help
Powered by ViewVC 1.1.22