95 |
fi |
fi |
96 |
#- clean-up old output files |
#- clean-up old output files |
97 |
rm -f $tdir/output_${typ}* |
rm -f $tdir/output_${typ}* |
98 |
|
touch $tdir/output_$tt |
99 |
if test $sepDir = 1 ; then |
if test $sepDir = 1 ; then |
100 |
new_dir="MITgcm_$typ" |
new_dir="MITgcm_$typ" |
101 |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
115 |
cd verification |
cd verification |
116 |
|
|
117 |
#-- set the testreport command: |
#-- set the testreport command: |
|
nbl='-100' |
|
118 |
comm="./testreport" |
comm="./testreport" |
119 |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
120 |
comm="$comm -adm" ; nbl='-60' |
comm="$comm -adm" |
121 |
elif test $typ = 'tlm' ; then |
elif test $typ = 'tlm' ; then |
122 |
comm="$comm -tlm" ; nbl='-60' |
comm="$comm -tlm" |
123 |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
124 |
export GOMP_STACKSIZE=400m |
export GOMP_STACKSIZE=400m |
125 |
export OMP_NUM_THREADS=2 |
export OMP_NUM_THREADS=2 |
158 |
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
159 |
export LM_LICENSE_FILE=$PGI/license.dat |
export LM_LICENSE_FILE=$PGI/license.dat |
160 |
fi |
fi |
161 |
basename $OPTFILE | grep gfortran > /dev/null 2>&1 ; retv=$? ; |
basename $OPTFILE | grep gfortran > /dev/null 2>&1 ; retv=$? ; |
162 |
GFORTRAN_OPTFILE=f ; if test $retv == 0 ; then GFORTRAN_OPTFILE='t' ; fi |
GFORTRAN_OPTFILE=f ; if test $retv == 0 ; then GFORTRAN_OPTFILE='t' ; fi |
163 |
export GFORTRAN_OPTFILE |
export GFORTRAN_OPTFILE |
164 |
|
|
165 |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
166 |
#-- cleaning: |
#-- cleaning: |
167 |
echo "======================" |
echo "======================" |
168 |
echo "Cleaning test directories:" |
echo "Cleaning test directories:" | tee -a $tdir/output_$tt |
169 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
170 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" | tee -a $tdir/output_$tt |
171 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN >> $tdir/output_$tt 2>&1 |
172 |
echo "======================" |
echo "======================" |
173 |
echo |
echo "" | tee -a $tdir/output_$tt |
174 |
fi |
fi |
175 |
|
|
176 |
#-- run the testreport command: |
#-- run the testreport command: |
177 |
echo -n "Running testreport using:" |
echo -n "Running testreport using:" | tee -a $tdir/output_$tt |
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 $MPI = 0 ; then echo '' |
if test $MPI = 0 ; then echo '' | tee -a $tdir/output_$tt |
182 |
else echo " (EXE='$EXE')" |
else echo " (EXE='$EXE')" | tee -a $tdir/output_$tt |
183 |
comm="$comm -MPI $MPI -command \"\$EXE\"" |
comm="$comm -MPI $MPI -command \"\$EXE\"" |
184 |
fi |
fi |
185 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
if test "x$option" != x ; then comm="$comm $option" ; fi |
186 |
#if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi |
#if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi |
187 |
echo " \"eval $comm\"" |
echo " \"eval $comm\"" | tee -a $tdir/output_$tt |
188 |
echo "======================" |
echo "======================" |
189 |
eval $comm > $tdir/output_$typ 2>&1 |
eval $comm >> $tdir/output_$tt 2>&1 |
190 |
tail $nbl $tdir/output_$typ |
sed -n "/^An email /,/^======== End of testreport / p" $tdir/output_$tt |
191 |
echo |
echo "" | tee -a $tdir/output_$tt |
192 |
|
|
193 |
#-- also test restart (test 2+2=4) |
#-- also test restart (test 2+2=4) |
194 |
if test $tt != $typ |
if test $tt != $typ |
195 |
then |
then |
196 |
echo "testing restart using:" |
echo "testing restart using:" | tee -a $tdir/output_$tt |
197 |
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
198 |
if test $MPI = 0 ; then |
if test $MPI = 0 ; then |
199 |
echo " \"$comm\"" |
echo " \"$comm\"" | tee -a $tdir/output_$tt |
200 |
echo "======================" |
echo "======================" |
201 |
$comm > $tdir/output_2+2 2>&1 |
$comm >> $tdir/output_$tt 2>&1 |
202 |
else |
else |
203 |
echo " \"$comm -mpi -exe $EXE\"" |
echo " \"$comm -mpi -exe $EXE\"" | tee -a $tdir/output_$tt |
204 |
echo "======================" |
echo "======================" |
205 |
$comm -mpi -exe "$EXE" > $tdir/output_2+2 2>&1 |
$comm -mpi -exe "$EXE" >> $tdir/output_$tt 2>&1 |
206 |
fi |
fi |
|
#tail $nbl $tdir/output_2+2 |
|
207 |
echo ; cat tst_2+2_out.txt |
echo ; cat tst_2+2_out.txt |
208 |
echo |
echo |
209 |
fi |
fi |
212 |
if test $sepDir = 0 ; then |
if test $sepDir = 0 ; then |
213 |
#-- cleaning: |
#-- cleaning: |
214 |
echo "======================" |
echo "======================" |
215 |
echo "Cleaning test directories:" |
echo "Cleaning test directories:" | tee -a $tdir/output_$tt |
216 |
if test $tt != $typ ; then |
if test $tt != $typ ; then |
217 |
cmdCLN="../tools/do_tst_2+2 -clean" |
cmdCLN="../tools/do_tst_2+2 -clean" |
218 |
echo " clean tst_2+2 running: $cmdCLN" |
echo " clean tst_2+2 running: $cmdCLN" | tee -a $tdir/output_$tt |
219 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
$cmdCLN >> $tdir/output_$tt 2>&1 |
220 |
fi |
fi |
221 |
if test $tt != $last_Tst ; then |
if test $tt != $last_Tst ; then |
222 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
223 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" | tee -a $tdir/output_$tt |
224 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN >> $tdir/output_$tt 2>&1 |
225 |
fi |
fi |
226 |
echo "======================" |
echo "======================" |
227 |
echo |
echo |