/[MITgcm]/MITgcm/verification/testreport
ViewVC logotype

Annotation of /MITgcm/verification/testreport

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


Revision 1.9.2.5 - (hide annotations) (download)
Fri Oct 3 16:03:00 2003 UTC (20 years, 6 months ago) by edhill
Branch: branch-genmake2
Changes since 1.9.2.4: +42 -43 lines
 o improve handling of the *.h_mpi and *.h_mpi files so that we don't
   have to suffer though lengthy re-builds

1 edhill 1.1 #!/bin/bash
2     #
3 edhill 1.9.2.5 # $Header: /u/u3/gcmpack/MITgcm/verification/testreport,v 1.9.2.4 2003/10/03 05:12:18 edhill Exp $
4 edhill 1.1 #
5    
6     usage()
7     {
8     echo
9     echo "Usage: $0 [OPTIONS]"
10     echo
11     echo "where possible OPTIONS are:"
12     echo " (-help|-h) print usage"
13 edhill 1.7 echo " (-mpi) use MPI input files"
14 edhill 1.6 echo " (-optfile=|-of=)STRING list of optfiles to use"
15 edhill 1.1 echo " (-a|-addr)STRING list of email recipients"
16 edhill 1.6 echo " (DEF=\"edhill@mitgcm.org\")"
17     echo " (-t|-tdir)STRING list of test dirs to use"
18     echo " (DEF=\"\" which builds all)"
19     echo " (-b|-bash)STRING location of \"bash\" executable"
20     echo " (DEF=\"\" for \"/bin/bash\")"
21     echo " (-c|-command)STRING command to run"
22     echo " (DEF=\"make output.txt\")"
23 edhill 1.8 echo " (-m|-make)STRING command to use for \"make\""
24     echo " (DEF=\"make\")"
25 edhill 1.9.2.1 echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\""
26     echo " (-nogenmake|-ng) skip the genmake stage"
27     echo " (-noclean|-nc) skip the \"make clean\" stage"
28     echo " (-nodepend|-nd) skip the \"make depend\" stage"
29 edhill 1.6 echo
30     echo "and where STRING follows a whitespace-delimited format"
31     echo "such as:"
32     echo " -t 'exp0 exp2 exp3' "
33     echo " -addr='abc@123.com testing@home.org'"
34 edhill 1.1 echo
35     exit 1
36     }
37    
38     # build the mpack utility
39     build_mpack()
40     {
41     echo -n "building the mpack utility... "
42     if test ! -x "$MPACKDIR/mpack" ; then
43     if test ! -d $MPACKDIR ; then
44     echo "Error: can't find \"$MPACKDIR\""
45     echo " are you sure this program is being run in the correct "
46     echo " (that is, \"MITGCM_ROOT\verification\") directory?"
47     exit 1
48     fi
49     echo -n "building mpack... "
50 edhill 1.8 ( cd $MPACKDIR && ./configure && $MAKE ) > build_mpack.out 2>&1
51 edhill 1.1 RETVAL=$?
52     if test "x$RETVAL" != x0 ; then
53     echo
54     echo "Error building the mpack tools at: $MPACK_DIR"
55     exit 1
56     fi
57     fi
58     echo "OK"
59     }
60    
61     compare_lines()
62     {
63     # use codelet to compare lines
64     if [ $verbose -gt 1 ]; then
65     cat tmp3.txt 1>&2
66     fi
67     return `./a.out < tmp3.txt`
68     }
69    
70     testoutput_for_prop()
71     {
72     # testoutput_for_prop dir s1 label subdir
73     #
74     # compares files in $dir/$subdir/output.txt and $dir/results/output.txt
75     # using search strings s1 and text label
76    
77     if [ $debug -gt 0 ]; then
78     echo testoutput_for_prop: grep "$2" $1/$4/output.txt 1>&2
79     fi
80     if [ -r $1/$4/output.txt ]; then
81     grep "$2" $1/$4/output.txt | sed 's/.*=//' | nl > tmp1.txt
82     lncnt=`wc -l tmp1.txt | awk '{print $1}' `
83     if [ $lncnt -lt 3 ]; then
84     if [ $verbose -gt 0 ]; then
85     echo Not enough lines of output when searching for "$2" 1>&2
86     fi
87     return 99
88     fi
89     else
90     echo testoutput_for_prop: output.txt from model run was not readable 1>&2
91     return 99
92     fi
93     if [ $debug -gt 0 ]; then
94     echo testoutput_for_prop: grep "$2" $1/results/output.txt 1>&2
95     fi
96     grep "$2" $1/results/output.txt | sed 's/.*=//' | nl > tmp2.txt
97     lncnt=`wc -l tmp2.txt | awk '{print $1}' `
98     if [ $lncnt -lt 3 ]; then
99     if [ $verbose -gt 0 ]; then
100     echo Not enough lines of output when searching for "$2" 1>&2
101     fi
102     return 99
103     fi
104     if [ $debug -gt 0 ]; then
105     echo testoutput_for_prop: join tmp1.txt tmp2.txt 1>&2
106     fi
107     join tmp1.txt tmp2.txt | awk '{print $1 " " $2 " " $3}' > tmp3.txt
108     if [ $debug -gt 0 ]; then
109     echo testoutput_for_prop: compare_lines 1>&2
110     fi
111     compare_lines
112     digits_of_similarity=$?
113     if [ $digits_of_similarity -eq 99 ]; then
114     if [ $verbose -gt 0 ]; then
115     echo testoutput_for_prop: No comparison was available for \"$2\" 1>&2
116     fi
117     digits_of_similarity=99
118     else
119     if [ $verbose -gt 0 ]; then
120     echo There were $digits_of_similarity decimal places of similarity for \"$2\" 1>&2
121     fi
122     fi
123     rm tmp1.txt tmp2.txt tmp3.txt
124    
125     return $digits_of_similarity
126     }
127    
128     dashnum()
129     {
130     # dashnum n1 n2 n3 ...
131     #
132     # print numbers using %3i format or "--" if number = 99
133    
134     for num in $@ ; do
135     if [ $num = 99 ]; then
136     printf ' --'
137     else
138     printf '%3i' $num
139     fi
140     done
141     }
142    
143     testoutput()
144     {
145     # testoutput diretory subdir
146     #
147     # test output in "directory"
148    
149     if [ $debug -gt 0 ]; then
150     echo testoutput: testoutput_for_prop $1 cg2d_init_res 1>&2
151     fi
152     testoutput_for_prop $1 "cg2d_init_res" "cg2d init. residual" $2; cg2dres=$?
153     if [ $debug -gt 0 ]; then
154     echo testoutput: cg2dres=$cg2dres 1>&2
155     fi
156    
157     testoutput_for_prop $1 "dynstat_theta_min" "theta minimum" $2; tmin=$?
158     testoutput_for_prop $1 "dynstat_theta_max" "theta maximum" $2; tmax=$?
159     testoutput_for_prop $1 "dynstat_theta_mean" "theta mean" $2; tmean=$?
160     testoutput_for_prop $1 "dynstat_theta_sd" "theta s.d." $2; tsd=$?
161     testoutput_for_prop $1 "dynstat_salt_min" "salt minimum" $2; smin=$?
162     testoutput_for_prop $1 "dynstat_salt_max" "salt maximum" $2; smax=$?
163     testoutput_for_prop $1 "dynstat_salt_mean" "salt mean" $2; smean=$?
164     testoutput_for_prop $1 "dynstat_salt_sd" "salt s.d." $2; ssd=$?
165     testoutput_for_prop $1 "dynstat_uvel_min" "U minimum" $2; umin=$?
166     testoutput_for_prop $1 "dynstat_uvel_max" "U maximum" $2; umax=$?
167     testoutput_for_prop $1 "dynstat_uvel_mean" "U mean" $2; umean=$?
168     testoutput_for_prop $1 "dynstat_uvel_sd" "U s.d." $2; usd=$?
169     testoutput_for_prop $1 "dynstat_vvel_min" "V minimum" $2; vmin=$?
170     testoutput_for_prop $1 "dynstat_vvel_max" "V maximum" $2; vmax=$?
171     testoutput_for_prop $1 "dynstat_vvel_mean" "V mean" $2; vmean=$?
172     testoutput_for_prop $1 "dynstat_vvel_sd" "V s.d." $2; vsd=$?
173    
174     dashnum $cg2dres $tmin $tmax $tmean $tsd $smin $smax $smean $ssd \
175     $umin $umax $umean $usd $vmin $vmax $vmean $vsd
176     }
177    
178     genmakemodel()
179     {
180     # genmakemodel directory
181 edhill 1.9.2.1 if test "x$NOGENMAKE" = xt ; then
182     echo "genmake skipped!"
183     else
184     GENMAKE2="$BASH ../../../tools/genmake2"
185     (
186     cd $1;
187     printf 'genmake ... ' 1>&2
188     # ../../../tools/genmake -ieee -mods=../code > make.log 2>&1
189     $GENMAKE2 -ds -m $MAKE --mods=../code "--optfile="$OPTFILE > make.log 2>&1
190     RETVAL=$?
191     for i in gm_state gm_optfile gm_local Makefile ; do
192     if test -r $i ; then
193     cp $i $CDIR
194     fi
195     done
196     if test "x$RETVAL" != x0 ; then
197     tail make.log
198     echo "genmakemodel: genmake failed" 1>&2
199     cp make.log $CDIR
200     return 1
201     else
202     echo "succesful" 1>&2
203 edhill 1.1 fi
204 edhill 1.9.2.1 )
205     fi
206 edhill 1.1 }
207    
208     makeclean()
209     {
210     # makeclean directory
211 edhill 1.9.2.1 if test "x$NOCLEAN" = xt ; then
212     echo "make CLEAN skipped!"
213     else
214     (
215     cd $1;
216     if test -e output.txt ; then
217     rm -f output.txt
218 edhill 1.1 fi
219 edhill 1.9.2.1 printf 'make CLEAN ... ' 2>&1
220     if test -r Makefile ; then
221     $MAKE CLEAN >> make.log 2>&1
222     RETVAL=$?
223     if test "x$RETVAL" != x0 ; then
224     tail make.log
225     echo "makeclean: \"make CLEAN\" failed" 1>&2
226     cp make.log $CDIR"/make.log"
227     return 1
228     fi
229     fi
230     echo succesful 1>&2
231     exit 0
232     )
233     fi
234 edhill 1.1 }
235    
236     makedependmodel()
237     {
238     # makedependmodel directory
239 edhill 1.9.2.1 if test "x$NODEPEND" = xt ; then
240     echo "make depend skipped!"
241     else
242     (
243     cd $1;
244     printf 'make depend ... ' 1>&2
245     $MAKE depend >> make.log 2>&1
246     RETVAL=$?
247     if test "x$RETVAL" != x0 ; then
248     tail make.log
249     echo "makedependmodel: make depend failed" 1>&2
250     cp make.log $CDIR"/make.log"
251     return 1
252     else
253     echo succesful 1>&2
254     fi
255     )
256     fi
257 edhill 1.1 }
258    
259     makemodel()
260     {
261     # makemodel directory
262     (
263     cd $1;
264     if test -r Makefile ; then
265     printf 'make ... ' 1>&2
266 edhill 1.8 $MAKE >> make.log 2>&1
267 edhill 1.1 RETVAL=$?
268     if test "x$RETVAL" != x0 ; then
269     tail make.log
270     echo failed 1>&2
271     cp make.log $CDIR"/make.log"
272     return 1
273     else
274     echo succesful 1>&2
275     fi
276     fi
277     )
278     }
279    
280     linkdata()
281     {
282     # linkdata flag
283     #
284     # symbolically link data files to run directory
285     if [ $1 -ne 0 ]; then
286     ( cd $2 ; ln -sf ../input/* . )
287     fi
288     }
289    
290     runmodel()
291     {
292 edhill 1.6 # runmodel directory
293 edhill 1.1 #
294 edhill 1.6 # runs "$COMMAND" in "directory"
295     # (where "$COMMAND" is relative to "directory")
296 edhill 1.1 (
297     cd $1
298 edhill 1.6 printf 'runmodel: ' 1>&2
299     # make output.txt
300     $COMMAND
301     RETVAL=$?
302     if test "x$RETVAL" = x0 ; then
303     cp output.txt $CDIR"/output.txt"
304     return 0
305     else
306     return 1
307 edhill 1.1 fi
308     )
309     }
310    
311     createcodelet()
312     {
313     # create codelet for comparing model output
314    
315     echo -n "creating the comparison code... "
316     cat > tmp_cmpnum.f <<EOFA
317     program cmpnum
318     implicit none
319     real*8 a,b,diff
320     integer linnum,best
321     best=-16
322     99 read(*,*,end=70,err=60) linnum,a,b
323     diff=0.5*(abs(a)+abs(b))
324     c print *,a,b,diff,abs(a-b)/diff
325     if (diff.gt.1.e-12) then
326     diff=abs(a-b)/diff
327     if (diff.gt.0.) then
328     c print *,int(log10(diff)),diff
329     linnum=int(log10(diff))
330     best=max(best,linnum)
331     endif
332     else
333     if (best.eq.-16.and.diff.ne.0.) best=-22
334     endif
335     goto 99
336     60 stop 'cmpnum: An error occured reading a,b'
337     70 print *,-best
338     end
339     EOFA
340    
341     f77 tmp_cmpnum.f
342     if [ -x ./a.out ]; then
343     echo "OK"
344     return 0
345     else
346     echo
347 edhill 1.3 echo "createcodelet: failed to compile codelet"
348 edhill 1.1 exit 1
349     fi
350     }
351    
352     formatresults()
353     {
354     # formatresults expt genmake depend make run results*
355    
356     nm=$1
357     printf '%s %s %s %s' $2 $3 $4 $5
358     shift; shift; shift; shift; shift;
359     printf '%3s' $@
360    
361     if [ $1 = '--' ]; then
362     printf ' N/O '
363     else
364     if [ $1 -gt 12 ]; then
365     printf ' pass'
366     else
367     printf ' FAIL'
368     fi
369     fi
370     printf ' %s' $nm
371     printf '\n'
372    
373     }
374    
375     show_help()
376     {
377     cat - << EOF
378     $0 [-help] [-quick] [-verbose] dir1 [dir2] [...]
379 edhill 1.9.2.1
380     -help|-h Show this help message
381 edhill 1.1 -quiet Reduce the amount of output
382     -verbose Produce copious amounts of output
383     -debug Produce even more output which will mean nothing to most
384     -force Do "make CLEAN" before compiling. This forces a complete rebuild.
385     -clean Do "make CLEAN" after compiling and testing.
386     -noieee By default, $0 uses the -ieee option for genmake. This turns it off.
387     -cleanup Aggresively removes all model output, executables and object files
388     and then exits. Use with care.
389    
390     Normal usage:
391     $0 * Configure, compile, run and analyze in all experiment directories
392     EOF
393     }
394    
395     scandirs()
396     {
397     if [ $# -eq 0 ]; then
398     for arg in * ; do
399     test -d $arg/input && echo $arg
400     done
401     else
402     echo $*
403     fi
404     }
405    
406    
407     ###############################################################################
408     ###############################################################################
409     ###############################################################################
410    
411    
412     # Default properties
413     debug=0
414     verbose=1
415     clean=0
416     expts=''
417 edhill 1.6 # ieee=1
418 edhill 1.9.2.1
419     CLEANUP=f
420 edhill 1.9.2.2 QUICK=f
421 edhill 1.9.2.1 NOGENMAKE=f
422     NOCLEAN=f
423     NODEPEND=f
424 edhill 1.1
425 edhill 1.4 BASH=
426 edhill 1.1 OPTFILES=
427 edhill 1.9.2.1 ADDRESSES=
428 edhill 1.1 TESTDIRS=
429     MPACKDIR="../tools/mpack-1.6"
430     MPACK="$MPACKDIR/mpack"
431 edhill 1.9.2.2 COMMAND="make output.txt"
432 edhill 1.8 MAKE=make
433 edhill 1.7 MPI=f
434 edhill 1.1
435     echo -n "parsing options... "
436    
437     ac_prev=
438     for ac_option ; do
439    
440     # If the previous option needs an argument, assign it.
441     if test -n "$ac_prev"; then
442     eval "$ac_prev=\$ac_option"
443     ac_prev=
444     continue
445     fi
446    
447     ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
448    
449     case $ac_option in
450    
451     -help | --help | -h | --h)
452     usage ;;
453    
454 edhill 1.2 -optfile | --optfile | -of | --of)
455 edhill 1.1 ac_prev=OPTFILES ;;
456 edhill 1.2 -optfile=* | --optfile=* | -of=* | --of=*)
457 edhill 1.1 OPTFILES=$ac_optarg ;;
458    
459     -addr | --addr | -a | --a)
460     ac_prev=ADDRESSES ;;
461     -addr=* | --addr=*)
462     ADDRESSES=$ac_optarg ;;
463    
464     -tdir | --tdir | -t | --t)
465     ac_prev=TESTDIRS ;;
466     -tdir=* | --tdir=*)
467     TESTDIRS=$ac_optarg ;;
468 edhill 1.4
469     -bash | --bash | -b | --b)
470     ac_prev=BASH ;;
471     -bash=* | --bash=*)
472     BASH=$ac_optarg ;;
473 edhill 1.5
474 edhill 1.6 -command | --command | -c | --c)
475     ac_prev=COMMAND ;;
476     -command=* | --command=*)
477     COMMAND=$ac_optarg ;;
478 edhill 1.8
479     -make | --make | -m | --m)
480     ac_prev=MAKE ;;
481     -make=* | --make=*)
482     MAKE=$ac_optarg ;;
483 edhill 1.1
484 edhill 1.9.2.3 -clean | --clean)
485 edhill 1.9.2.2 CLEANUP=t ;;
486    
487 edhill 1.9.2.1 -quick | --quick | -q | --q)
488     QUICK=t ;;
489     -nogenmake | --nogenmake | -ng | --ng)
490     NOGENMAKE=t ;;
491     -noclean | --noclean | -nc | --nc)
492     NOCLEAN=t ;;
493     -nodepend | --nodepend | -nd | --nd)
494     NODEPEND=t ;;
495    
496 edhill 1.7 -mpi) MPI=t ;;
497 edhill 1.1 -verbose) verbose=2 ;;
498     -debug) debug=1 ;;
499     -clean) clean=1 ;;
500     -quiet) verbose=0 ;;
501    
502     -*)
503     echo "Error: unrecognized option: "$ac_option
504     usage
505     ;;
506    
507     *)
508     echo "Error: unrecognized argument: "$ac_option
509     usage
510     ;;
511    
512     esac
513    
514     done
515    
516 edhill 1.9.2.1 if test "x$QUICK" = xt ; then
517     NOGENMAKE=t
518     NOCLEAN=t
519     NODEPEND=t
520     fi
521    
522 edhill 1.1 if test "x$TESTDIRS" = x ; then
523     TESTDIRS=`scandirs`
524     fi
525    
526 edhill 1.9.2.1 if test "x$OPTFILES" = x ; then
527     OPTFILES=$MITGCM_OF
528     fi
529     if test "x$OPTFILES" = x ; then
530     echo "Error: please specify an optfile using either the command-line or"
531     echo " the MITGCM_OF environment variable. Also, examples are located "
532     echo " in \$ROOTDIR/tools/build_options"
533     exit 1
534     fi
535    
536 edhill 1.1 echo "OK"
537    
538     # create the FORTRAN comparison code
539     createcodelet
540    
541     # build the mpack utility
542     build_mpack
543    
544     # Create a uniquely named directory to store results
545     MACH=`hostname`
546 edhill 1.2 UNAMEA=`uname -a`
547 edhill 1.1 DATE=`date +%Y%m%d`
548     BASE=$MACH"_"$DATE"_"
549     DNUM=0
550     DRESULTS="$BASE$DNUM"
551     while test -e $DRESULTS ; do
552     DNUM=$(( $DNUM + 1 ))
553     DRESULTS="$BASE$DNUM"
554     done
555     mkdir $DRESULTS
556     RETVAL=$?
557     if test "x$RETVAL" != x0 ; then
558     echo "Error: can't create results directory \"./$DRESULTS\""
559     exit 1
560     fi
561     SUMMARY="$DRESULTS/summary.txt"
562     date > $SUMMARY
563     cat << EOF >> $SUMMARY
564     T S U V
565     G D M c m s m s m s m s
566     E p a R g m m e . m m e . m m e . m m e .
567     N n k u 2 i a a d i a a d i a a d i a a d
568     2 d e n d n x n . n x n . n x n . n x n .
569    
570     EOF
571    
572     NDIR=0
573    
574     # For each optfile...
575     for OPTFILE in $OPTFILES ; do
576    
577     OPTFILE=`pwd`"/$OPTFILE"
578     if test ! -r $OPTFILE ; then
579     echo "Error: can't read optfile \"$OPTFILE\""
580     exit 1
581     fi
582     echo
583     echo "OPTFILE=$OPTFILE" >> $SUMMARY
584     echo >> $SUMMARY
585    
586     # ...and each test directory...
587     for dir in $TESTDIRS ; do
588 edhill 1.3
589 edhill 1.9.2.2 # Cleanup only!
590     if test "x$CLEANUP" = xt ; then
591     if test -r $dir/build/Makefile ; then
592     ( cd $dir/build ; make CLEAN )
593     fi
594     if test -r $dir/input/Makefile ; then
595     ( cd $dir/input ; make CLEAN )
596     fi
597     continue
598     fi
599    
600 edhill 1.3 # Verify that the testdir exists and contains previous
601     # results in the correct location--or skip this directory!
602     if test ! -r $dir"/results/output.txt" ; then
603 edhill 1.9.2.4 echo
604     echo "can't read \"$dir/results/output.txt\" -- skipping $dir"
605     echo
606 edhill 1.3 continue
607     fi
608 edhill 1.7
609 edhill 1.1 echo "-------------------------------------------------------------------------------"
610     echo
611     echo "Experiment: $dir"
612     echo
613     unset genmake makedepend make run
614     results='-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --'
615 edhill 1.9.2.1
616 edhill 1.1 if [ -r $dir/build ]; then
617     seperatebuilddir=1
618     builddir=build
619     rundir=build
620     ( cd $dir/build; ln -sf ../input/* . )
621     else
622     seperatebuilddir=0
623     builddir=input
624     rundir=input
625 edhill 1.2 fi
626 edhill 1.9.2.5
627     CODE_DIR=$dir/code
628     BUILD_DIR=$dir/$builddir
629     MPI_FILES="CPP_EEOPTIONS.h_mpi SIZE.h_mpi"
630     NOMPI_FILES="CPP_EEOPTIONS.h_nompi SIZE.h_nompi"
631     # Is this an MPI run?
632     if test "x$MPI" = xt ; then
633     FILES=$MPI_FILES
634     else
635     FILES=$NOMPI_FILES
636     fi
637    
638     # Check to see that we have the files
639     have_files=t
640     for i in $FILES ; do
641     if test ! -r $CODE_DIR/$i ; then
642     echo "Warning: can't read file $CODE_DIR/$i" | tee -a $SUMMARY
643     have_files=f
644     fi
645     done
646     if test "x$have_files" != xt -a "x$MPI" = xt ; then
647     echo "Skipping $dir due to lack of input files (see above warning)" \
648     | tee -a $SUMMARY
649     continue
650     fi
651    
652     # If we have the $FILES and they differ, copy the $FILES to $BUILD_DIR
653     if "x$have_files" = xt ; then
654     for i in $FILES ; do
655     cmp $CODE_DIR/$i $BUILD_DIR/$i > /dev/null 2>&1
656     RETVAL=$?
657     if test "x$RETVAL" != x0 ; then
658     cp $CODE_DIR/$i $BUILD_DIR/$i
659     fi
660     done
661     fi
662    
663     # Create an output dir for each OPTFILE/tdir combination
664     CDIR=$DRESULTS"/"$DRESULTS"_"$NDIR
665     mkdir $CDIR
666     CDIR=`pwd`"/$CDIR"
667 edhill 1.2
668 edhill 1.9.2.1 if test "x$CLEANUP" = xt ; then
669     makeclean $dir/$builddir
670     else
671     genmakemodel $dir/$builddir && genmake=Y \
672     && makeclean $dir/$builddir \
673     && makedependmodel $dir/$builddir && makedepend=Y \
674     && makemodel $dir/$builddir && make=Y \
675     && linkdata $seperatebuilddir $dir/$rundir \
676     && runmodel $dir/$builddir && run=Y \
677     && results=`testoutput $dir $rundir`
678     fi
679    
680 edhill 1.1 echo
681 edhill 1.2 formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
682     ${run:-N} $results
683 edhill 1.1 echo
684 edhill 1.2 formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
685     ${run:-N} $results >> $SUMMARY
686     echo "fresults='" > $CDIR"/summary.txt"
687     formatresults $dir ${genmake:-N} ${makedepend:-N} ${make:-N} \
688     ${run:-N} $results >> $CDIR"/summary.txt"
689     echo "'" >> $CDIR"/summary.txt"
690     echo "MACH='$MACH'" >> $CDIR"/summary.txt"
691     echo "UNAMEA='$UNAMEA'" >> $CDIR"/summary.txt"
692     echo "DATE='$DATE'" >> $CDIR"/summary.txt"
693     echo "tdir='$dir'" >> $CDIR"/summary.txt"
694    
695     (
696     cd $DRESULTS
697     tar -cf $NDIR".tar" $DRESULTS"_"$NDIR > /dev/null 2>&1
698     gzip $NDIR".tar"
699     )
700 edhill 1.1
701 edhill 1.9.2.1 if test "x$ADDRESSES" = xNONE -o "x$ADDRESSES" = x ; then
702     echo "No mail sent"
703 edhill 1.2 else
704 edhill 1.9.2.1 $MPACK -s MITgcm-test -m 1000000 $DRESULTS"/"$NDIR".tar.gz" $ADDRESSES
705     RETVAL=$?
706     if test "x$RETVAL" != x0 ; then
707     echo "Warning: \"$MPACK\" failed -- please contact <edhill@mitgcm.org>"
708     else
709     rm -f $DRESULTS"/"$NDIR".tar*"
710     fi
711 edhill 1.2 fi
712 edhill 1.1
713     NDIR=$(( $NDIR + 1 ))
714    
715     done
716     done
717    
718 edhill 1.2 rm tmp_cmpnum.f a.out
719 edhill 1.1
720     cat $SUMMARY
721    

  ViewVC Help
Powered by ViewVC 1.1.22