2 |
|
|
3 |
# $Header$ |
# $Header$ |
4 |
|
|
|
# Ed Hill |
|
|
|
|
5 |
# Test script for MITgcm that should work on most of the csail.mit.edu |
# Test script for MITgcm that should work on most of the csail.mit.edu |
6 |
# Linux machines. |
# Linux machines. |
7 |
|
|
40 |
TODAY=`date +%d` |
TODAY=`date +%d` |
41 |
tdir=$TESTDIR |
tdir=$TESTDIR |
42 |
if test $checkOut = '0' ; then |
if test $checkOut = '0' ; then |
43 |
if test -e $tdir/MITgcm/CVS ; then |
if test -e $tdir/MITgcm/CVS ; then |
44 |
echo $tdir/MITgcm/CVS 'exist' |
echo $tdir/MITgcm/CVS 'exist' |
45 |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
46 |
cd $tdir/MITgcm |
cd $tdir/MITgcm |
47 |
if test $sepDir = 1 ; then |
if test $sepDir = 1 ; then |
48 |
$cmdCVS update -P -d > /dev/null |
$cmdCVS update -P -d > /dev/null |
49 |
|
else |
50 |
|
$cmdCVS update -P -d |
51 |
|
fi |
52 |
|
echo " done" |
53 |
else |
else |
54 |
$cmdCVS update -P -d |
echo -n $tdir/MITgcm 'missing ; ' |
55 |
|
checkOut=1 |
56 |
fi |
fi |
|
echo " done" |
|
|
else |
|
|
echo -n $tdir/MITgcm 'missing ; ' |
|
|
checkOut=1 |
|
|
fi |
|
57 |
fi |
fi |
58 |
if test $checkOut = '1' ; then |
if test $checkOut = '1' ; then |
59 |
if test -e $tdir ; then |
if test -e $tdir ; then |
113 |
|
|
114 |
#-- set the testreport command: |
#-- set the testreport command: |
115 |
nbl='-100' |
nbl='-100' |
116 |
comm="./testreport" |
comm="./testreport" |
117 |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
118 |
nbl='-60' |
nbl='-60' |
119 |
comm="$comm -adm" |
comm="$comm -adm" |
120 |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
137 |
esac |
esac |
138 |
#-- set MPI command: |
#-- set MPI command: |
139 |
if test $MPI = 1 ; then |
if test $MPI = 1 ; then |
140 |
if test $typ = 'mpa' ; then |
if test $typ = 'mpa' ; then |
141 |
EXE="mpirun -np TR_NPROC ./mitgcmuv_ad" |
EXE="mpirun -np TR_NPROC ./mitgcmuv_ad" |
142 |
else |
else |
143 |
EXE="mpirun -np TR_NPROC ./mitgcmuv" |
EXE="mpirun -np TR_NPROC ./mitgcmuv" |
144 |
fi |
fi |
145 |
fi |
fi |
146 |
|
|
147 |
|
#-- set specific Env Vars: |
148 |
|
if test $typ = 'ifc' ; then |
149 |
|
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
150 |
|
fi |
151 |
|
if test $typ = 'pgi' ; then |
152 |
|
export PGI=/srv/software/pgi/pgi-10.9 |
153 |
|
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
154 |
|
export LM_LICENSE_FILE=$PGI/license.dat |
155 |
|
fi |
156 |
|
|
157 |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
158 |
#-- cleaning: |
#-- cleaning: |
159 |
echo "======================" |
echo "======================" |
165 |
echo |
echo |
166 |
fi |
fi |
167 |
|
|
|
#-- set specific Env Vars: |
|
|
if test $typ = 'ifc' ; then |
|
|
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
|
|
fi |
|
|
if test $typ = 'pgi' ; then |
|
|
export PGI=/srv/software/pgi/pgi-10.9 |
|
|
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
|
|
export LM_LICENSE_FILE=$PGI/license.dat |
|
|
fi |
|
|
|
|
168 |
#-- run the testreport command: |
#-- run the testreport command: |
169 |
echo -n "Running testreport using:" |
echo -n "Running testreport using:" |
170 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
203 |
|
|
204 |
if test $sepDir = 0 ; then |
if test $sepDir = 0 ; then |
205 |
#-- cleaning: |
#-- cleaning: |
206 |
echo "======================" |
echo "======================" |
207 |
echo "Cleaning test directories:" |
echo "Cleaning test directories:" |
208 |
if test $tt != $typ ; then |
if test $tt != $typ ; then |
209 |
cmdCLN="../tools/do_tst_2+2 -clean" |
cmdCLN="../tools/do_tst_2+2 -clean" |
210 |
echo " clean tst_2+2 running: $cmdCLN" |
echo " clean tst_2+2 running: $cmdCLN" |
211 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
212 |
fi |
fi |
213 |
if test $tt != $last_Tst ; then |
if test $tt != $last_Tst ; then |
214 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
215 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" |
216 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN > /dev/null 2>&1 |
217 |
fi |
fi |
218 |
echo "======================" |
echo "======================" |
219 |
echo |
echo |
220 |
fi |
fi |
221 |
popd |
popd |
222 |
|
|
223 |
done |
done |