| 1 |
edhill |
1.1 |
#! /usr/bin/env bash |
| 2 |
|
|
|
| 3 |
|
|
# $Header: /u/u3/gcmpack/MITgcm_contrib/test_scripts/faulks/test_lcs,v 1.1 2003/11/28 17:37:57 edhill Exp $ |
| 4 |
|
|
|
| 5 |
|
|
# Ed Hill |
| 6 |
|
|
|
| 7 |
|
|
# Testing script designed to be run on halem. Note that halem |
| 8 |
|
|
# doesn't seem to have a working cron system for ordinary users -- I |
| 9 |
|
|
# got multiple errors. |
| 10 |
|
|
|
| 11 |
|
|
usage() |
| 12 |
|
|
{ |
| 13 |
|
|
cat << EOF |
| 14 |
|
|
|
| 15 |
|
|
Usage: $0 [OPTIONS] |
| 16 |
|
|
|
| 17 |
|
|
where possible OPTIONS are: |
| 18 |
|
|
(-help|-h) print usage |
| 19 |
|
|
(-of | -optfile)FILE specify an OPTFILE |
| 20 |
|
|
(default=$OPTFILE) |
| 21 |
|
|
(-[no]ieee) IEEE math flag |
| 22 |
|
|
(default=-ieee) |
| 23 |
|
|
|
| 24 |
|
|
EOF |
| 25 |
|
|
exit 1 |
| 26 |
|
|
} |
| 27 |
|
|
|
| 28 |
|
|
|
| 29 |
|
|
# defaults |
| 30 |
|
|
OPTFILE="../tools/build_options/osf1_alpha_f77" |
| 31 |
|
|
IEEE="-ieee" |
| 32 |
|
|
|
| 33 |
|
|
# Parse options |
| 34 |
|
|
ac_prev= |
| 35 |
|
|
for ac_option ; do |
| 36 |
|
|
|
| 37 |
|
|
# If the previous option needs an argument, assign it. |
| 38 |
|
|
if test -n "$ac_prev"; then |
| 39 |
|
|
eval "$ac_prev=\$ac_option" |
| 40 |
|
|
ac_prev= |
| 41 |
|
|
continue |
| 42 |
|
|
fi |
| 43 |
|
|
|
| 44 |
|
|
ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` |
| 45 |
|
|
|
| 46 |
|
|
case $ac_option in |
| 47 |
|
|
|
| 48 |
|
|
-help | --help | -h | --h) |
| 49 |
|
|
usage ;; |
| 50 |
|
|
|
| 51 |
|
|
-of | --of | -optfile | --optfile) |
| 52 |
|
|
ac_prev=OPTFILE ;; |
| 53 |
|
|
--of=* | -of=* | --optfile=* | -optfile=*) |
| 54 |
|
|
OPTFILE=$ac_optarg ;; |
| 55 |
|
|
|
| 56 |
|
|
-ieee) |
| 57 |
|
|
IEEE="-ieee" ;; |
| 58 |
|
|
-noieee) |
| 59 |
|
|
IEEE= ;; |
| 60 |
|
|
|
| 61 |
|
|
*) |
| 62 |
|
|
echo "Error: don't understand argument \"$ac_option\"" |
| 63 |
|
|
usage |
| 64 |
|
|
;; |
| 65 |
|
|
|
| 66 |
|
|
esac |
| 67 |
|
|
|
| 68 |
|
|
done |
| 69 |
|
|
|
| 70 |
|
|
echo -n "Creating a temp directory ..." |
| 71 |
|
|
cd /scr/edhill |
| 72 |
|
|
mach=`hostname` |
| 73 |
|
|
file=${OPTFILE##*/} |
| 74 |
|
|
tdir=$mach"_"$file |
| 75 |
|
|
test -e $tdir && rm -rf $tdir |
| 76 |
|
|
mkdir $tdir |
| 77 |
|
|
cd $tdir |
| 78 |
|
|
echo " done" |
| 79 |
|
|
|
| 80 |
|
|
echo -n "Getting the previously-uploaded tarball ..." |
| 81 |
|
|
tball=/u1/edhill/MITgcm.tar.gz |
| 82 |
|
|
if test -r $tball ; then |
| 83 |
|
|
gunzip $tball |
| 84 |
|
|
tar -xf ${tball/.gz/} |
| 85 |
|
|
else |
| 86 |
|
|
echo |
| 87 |
|
|
echo "ERROR: can't read \"$tball\"" |
| 88 |
|
|
exit 1 |
| 89 |
|
|
fi |
| 90 |
|
|
echo " done" |
| 91 |
|
|
|
| 92 |
|
|
echo "Running testreport using:" |
| 93 |
|
|
cd MITgcm/verification |
| 94 |
|
|
comm="./testreport $IEEE -a edhill@mitgcm.org" |
| 95 |
|
|
if test "x$OPTFILE" != x ; then |
| 96 |
|
|
comm="$comm -of=$OPTFILE" |
| 97 |
|
|
fi |
| 98 |
|
|
echo " \"$comm\"" |
| 99 |
|
|
echo "======================" |
| 100 |
|
|
echo |
| 101 |
|
|
$comm |
| 102 |
|
|
|
| 103 |
|
|
rm -rf /u1/edhill/MITgcm.tar |
| 104 |
|
|
|