/[MITgcm]/MITgcm/tools/example_scripts/faulks/test_lcs
ViewVC logotype

Contents of /MITgcm/tools/example_scripts/faulks/test_lcs

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


Revision 1.1 - (show annotations) (download)
Thu Jul 28 15:09:31 2005 UTC (18 years, 10 months ago) by edhill
Branch: MAIN
CVS Tags: checkpoint57n_post, checkpoint57p_post, checkpoint57o_post
 o copy over from MITgcm_contrib/test_scripts/faulks

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/faulks/test_lcs,v 1.11 2005/06/09 17:56:05 edhill Exp $
4
5 # Ed Hill
6
7 # Test script for MITgcm that should work on most of the lcs.mit.edu
8 # Linux machines.
9
10 usage()
11 {
12 cat << EOF
13
14 Usage: $0 [OPTIONS]
15
16 where possible OPTIONS are:
17 (-help|-h) print usage
18 (-dir | -d) TDIR specify testing directory
19 (def="$TDIR")
20 (-of | -optfile) FILE specify an OPTFILE
21 (def="$OPTFILE")
22 (-[no]ieee) IEEE math flag
23 (def="$IEEE")
24
25 EOF
26 exit 1
27 }
28
29
30 # defaults
31 export PATH='/usr/local/bin:/bin:/usr/bin'
32 OPTFILE=
33 TESTDIR="/scratch/edhill/test_"`hostname`
34 IEEE="-ieee"
35
36 # Parse options
37 ac_prev=
38 for ac_option ; do
39
40 # If the previous option needs an argument, assign it.
41 if test -n "$ac_prev"; then
42 eval "$ac_prev=\$ac_option"
43 ac_prev=
44 continue
45 fi
46
47 ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
48
49 case $ac_option in
50
51 -help | --help | -h | --h)
52 usage ;;
53
54 -dir | --dir | -d | --d)
55 ac_prev=TESTDIR ;;
56 -dir=* | --dir=* | -d=* | --d=*)
57 TESTDIR=$ac_optarg ;;
58
59 -of | --of | -optfile | --optfile)
60 ac_prev=OPTFILE ;;
61 --of=* | -of=* | --optfile=* | -optfile=*)
62 OPTFILE=$ac_optarg ;;
63
64 -ieee)
65 IEEE="-ieee" ;;
66 -noieee)
67 IEEE= ;;
68
69 *)
70 echo "Error: don't understand argument \"$ac_option\""
71 usage
72 ;;
73
74 esac
75
76 done
77
78 echo -n "Creating a temp directory ..."
79 mach=`hostname`
80 file=${OPTFILE##*/}
81 tdir=$TESTDIR"_"$file
82 test -e $tdir && rm -rf $tdir
83 mkdir $tdir
84 echo " done"
85
86 echo -n "Downloading the MITgcm code from CVS pserver..."
87 cd $tdir
88 export CVSROOT='/u/gcmpack'
89 cvs co MITgcm > /dev/null 2>&1
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 | tail -100
102
103 echo
104 echo "======================"
105 echo "Cleaning test directories:"
106 ./testreport -clean > /dev/null 2>&1
107 echo "======================"
108 echo
109
110 echo "Running testreport using:"
111 cd MITgcm/verification
112 comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_ifort -a edhill@mitgcm.org"
113 echo " \"$comm\""
114 echo "======================"
115 echo
116 $comm | tail -100
117
118 echo
119 echo "======================"
120 echo "Cleaning test directories:"
121 ./testreport -clean > /dev/null 2>&1
122 echo "======================"
123 echo
124
125 echo "Running testreport using:"
126 export PGI=/usr/local/pkg/pgi/pgi-5.2-fc3
127 cd MITgcm/verification
128 comm="./testreport $IEEE -of ../tools/build_options/linux_ia32_pgf77+authors_fc3 -a edhill@mitgcm.org"
129 echo " \"$comm\""
130 echo "======================"
131 echo
132 $comm | tail -100
133
134 echo
135 echo "======================"
136 echo "Cleaning test directories:"
137 ./testreport -clean > /dev/null 2>&1
138 echo "======================"
139 echo
140
141 echo "Running testreport using:"
142 comm="./testreport -adm $IEEE -a edhill@mitgcm.org"
143 if test "x$OPTFILE" != x ; then
144 comm="$comm -of=$OPTFILE"
145 fi
146 echo " \"$comm\""
147 echo "======================"
148 echo
149 $comm | tail -100
150

  ViewVC Help
Powered by ViewVC 1.1.22