9 |
|
|
10 |
# defaults |
# defaults |
11 |
export PATH="$PATH:/usr/local/bin" |
export PATH="$PATH:/usr/local/bin" |
12 |
|
#- to get case insensitive "ls" (and order of tested experiments) |
13 |
|
export LC_ALL="en_US.UTF-8" |
14 |
|
# Turn off stack limit for FIZHI & AD-tests |
15 |
|
ulimit -s unlimited |
16 |
|
|
17 |
TESTDIR="/tmp/jmc/test_"`hostname -s` |
TESTDIR="/tmp/jmc/test_"`hostname -s` |
18 |
MC=10 |
MC=10 |
19 |
checkOut=1 |
checkOut=1 |
20 |
sepDir=0 |
sepDir=0 |
21 |
|
option= |
22 |
#tst_list='adm g77 pgi gfo ifc mth' |
#tst_list='adm g77 pgi gfo ifc mth' |
23 |
tst_list='adm g77 gfo+rs mth' |
tst_list='adm g77 gfo+rs mth' |
24 |
|
|
25 |
# Turn off stack limit for FIZHI |
#option="-nc" ; checkOut=0 |
26 |
ulimit -s unlimited |
#option="-q" ; checkOut=0 |
27 |
|
|
28 |
tdir=$TESTDIR |
tdir=$TESTDIR |
29 |
if test $checkOut = '0' ; then |
if test $checkOut = '0' ; then |
31 |
echo $tdir/MITgcm/CVS 'exist' |
echo $tdir/MITgcm/CVS 'exist' |
32 |
echo -n "Update the MITgcm code from CVS pserver..." |
echo -n "Update the MITgcm code from CVS pserver..." |
33 |
cd $tdir/MITgcm |
cd $tdir/MITgcm |
34 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d > /dev/null |
if test $sepDir = 1 ; then |
35 |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d > /dev/null |
36 |
|
else |
37 |
|
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d |
38 |
|
fi |
39 |
echo " done" |
echo " done" |
40 |
cd $tdir |
else |
|
else |
|
41 |
echo -n $tdir/MITgcm 'missing ; ' |
echo -n $tdir/MITgcm 'missing ; ' |
42 |
checkOut=1 |
checkOut=1 |
43 |
fi |
fi |
57 |
#cvs co -P MITgcm > /dev/null |
#cvs co -P MITgcm > /dev/null |
58 |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co -P MITgcm > /dev/null |
59 |
echo " done" |
echo " done" |
60 |
|
else |
61 |
|
cd $tdir |
62 |
fi |
fi |
63 |
|
|
64 |
#------------------------------------------------------------------------ |
#------------------------------------------------------------------------ |
65 |
|
|
66 |
|
firstTst=`echo $tst_list | awk '{print $1}'` |
67 |
|
last_Tst=`echo $tst_list | awk '{print $NF}'` |
68 |
for tt in $tst_list |
for tt in $tst_list |
69 |
do |
do |
70 |
|
|
74 |
rm -f $tdir/output_${typ}* |
rm -f $tdir/output_${typ}* |
75 |
if test $sepDir = 1 ; then |
if test $sepDir = 1 ; then |
76 |
new_dir="MITgcm_$typ" |
new_dir="MITgcm_$typ" |
77 |
test -e $new_dir && rm -rf $new_dir |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
78 |
mkdir $new_dir |
pushd $new_dir |
79 |
pushd $new_dir |
echo -n "Update the MITgcm code from CVS pserver..." |
80 |
cp -ra ../MITgcm/* . |
cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack update -P -d |
81 |
|
echo " done" |
82 |
|
else |
83 |
|
test -e $new_dir && rm -rf $new_dir |
84 |
|
mkdir $new_dir |
85 |
|
pushd $new_dir |
86 |
|
cp -ra ../MITgcm/* . |
87 |
|
fi |
88 |
else |
else |
89 |
pushd MITgcm |
pushd MITgcm |
90 |
fi |
fi |
101 |
*) OPTFILE= ;; |
*) OPTFILE= ;; |
102 |
esac |
esac |
103 |
|
|
104 |
|
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
105 |
|
#-- cleaning: |
106 |
|
echo "======================" |
107 |
|
echo "Cleaning test directories:" |
108 |
|
cmdCLN="./testreport -clean" |
109 |
|
echo " clean dir running: $cmdCLN" |
110 |
|
$cmdCLN > /dev/null 2>&1 |
111 |
|
echo "======================" |
112 |
|
echo |
113 |
|
fi |
114 |
|
|
115 |
if test $typ = 'g77' |
if test $typ = 'g77' |
116 |
then |
then |
117 |
|
|
120 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
121 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
122 |
fi |
fi |
123 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
124 |
echo " \"$comm\"" |
echo " \"$comm\"" |
125 |
echo "======================" |
echo "======================" |
126 |
$comm > $tdir/output_$typ 2>&1 |
$comm > $tdir/output_$typ 2>&1 |
149 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
150 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
151 |
fi |
fi |
152 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
153 |
echo " \"$comm\"" |
echo " \"$comm\"" |
154 |
echo "======================" |
echo "======================" |
155 |
$comm > $tdir/output_$typ 2>&1 |
$comm > $tdir/output_$typ 2>&1 |
178 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
179 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
180 |
fi |
fi |
181 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
182 |
echo " \"$comm\"" |
echo " \"$comm\"" |
183 |
echo "======================" |
echo "======================" |
184 |
$comm > $tdir/output_$typ 2>&1 |
$comm > $tdir/output_$typ 2>&1 |
195 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
196 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
197 |
fi |
fi |
198 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
199 |
echo " \"$comm\"" |
echo " \"$comm\"" |
200 |
echo "======================" |
echo "======================" |
201 |
$comm > $tdir/output_$typ 2>&1 |
$comm > $tdir/output_$typ 2>&1 |
225 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
226 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
227 |
fi |
fi |
228 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
229 |
echo " \"$comm\"" |
echo " \"$comm\"" |
230 |
echo "======================" |
echo "======================" |
231 |
$comm > $tdir/output_$typ 2>&1 |
$comm > $tdir/output_$typ 2>&1 |
256 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
257 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
258 |
fi |
fi |
259 |
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
260 |
echo " \"$comm\"" |
echo " \"$comm\"" |
261 |
echo "======================" |
echo "======================" |
262 |
$comm > $tdir/output_${typ}_1 2>&1 |
$comm > $tdir/output_${typ}_1 2>&1 |
296 |
echo " clean tst_2+2 running: $cmdCLN" |
echo " clean tst_2+2 running: $cmdCLN" |
297 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
298 |
fi |
fi |
299 |
|
if test $tt != $last_Tst ; then |
300 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
301 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" |
302 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN > /dev/null 2>&1 |
303 |
|
fi |
304 |
echo "======================" |
echo "======================" |
305 |
echo |
echo |
306 |
fi |
fi |