2 |
|
|
3 |
# $Header$ |
# $Header$ |
4 |
|
|
5 |
# Ed Hill |
# Test script for MITgcm that should work on most of the csail.mit.edu Linux machines. |
6 |
|
|
7 |
# Test script for MITgcm that should work on most of the csail.mit.edu |
tst_grp=0 ; if test $# = 1 ; then tst_grp=$1 ; fi |
8 |
# Linux machines. |
if test $tst_grp != 'a' -a $tst_grp != 'b' ; then |
9 |
|
echo "missing or invalid argument (expect: 'a' or 'b') ==> exit" |
10 |
|
exit 1 |
11 |
|
fi |
12 |
|
|
13 |
# defaults |
# defaults |
14 |
#export PATH="$PATH:/usr/local/bin" |
#export PATH="$PATH:/usr/local/bin" |
17 |
export LC_ALL="en_US.UTF-8" |
export LC_ALL="en_US.UTF-8" |
18 |
# Turn off stack limit for FIZHI & AD-tests |
# Turn off stack limit for FIZHI & AD-tests |
19 |
ulimit -s unlimited |
ulimit -s unlimited |
20 |
|
# MPI test (for now, only with gfortran) |
21 |
|
export MPI_GCC_DIR=/srv/software/gcc/gcc-packages/gcc-4.4.5/mpich2/mpich2-1.3 |
22 |
|
export MPI_INC_DIR=$MPI_GCC_DIR/include |
23 |
|
export PATH="$PATH:$MPI_GCC_DIR/bin" |
24 |
|
|
25 |
#- method to acces CVS: |
#- method to acces CVS: |
26 |
# export CVSROOT='/u/gcmpack' |
# export CVSROOT='/u/gcmpack' |
30 |
cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack' |
cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack' |
31 |
cmdCVS='cvs -d /u/gcmpack' |
cmdCVS='cvs -d /u/gcmpack' |
32 |
|
|
33 |
TESTDIR="/scratch/jmc/test_"`hostname -s` |
# checkOut=2 : download new code ; |
34 |
|
# =3 : skip download but, if sepDir, use a new copy |
35 |
|
# =1 : update code (if no existing code -> swith to 2) |
36 |
|
# =0 : use existing code (if no existing code -> swith to 2) |
37 |
|
dInWeek=`date +%a` |
38 |
|
|
39 |
|
dNam=`hostname -s | tr '[:upper:]' '[:lower:]'` |
40 |
|
TESTDIR="/scratch/jmc/test_${dNam}" |
41 |
|
outDir="${dNam}-${tst_grp}" |
42 |
|
#outDir=`hostname -s` |
43 |
MC=13 |
MC=13 |
|
checkOut=1 |
|
44 |
sepDir=1 |
sepDir=1 |
45 |
option= |
option= |
|
tst_list='g7a adm g77 gfo+rs mth ifc' |
|
|
#tst_list='g77 adm gfo ifc mth pgi+rs' |
|
|
#tst_list='g77 gfo+rs mth' |
|
46 |
|
|
47 |
#option="-nc" ; checkOut=0 |
#tst_list='g7a adm mpa g77 gfo+rs mth mp2+rs mpi ifc' |
48 |
#option="-q" ; checkOut=0 |
#if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm oad" ; fi |
49 |
|
if test $tst_grp = 'a' ; then |
50 |
|
checkOut=2 |
51 |
|
tst_list='g7a mpa mth mp2+rs mpi oad' |
52 |
|
else |
53 |
|
checkOut=3 |
54 |
|
tst_list='adm g77 gfo+rs ifc' |
55 |
|
if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi |
56 |
|
fi |
57 |
|
echo " test: $outDir ; list='$tst_list'" |
58 |
|
|
59 |
|
#option="-nc" ; checkOut=1 |
60 |
|
#option="-q" ; checkOut=1 |
61 |
|
|
62 |
TODAY=`date +%d` |
TODAY=`date +%d` |
63 |
tdir=$TESTDIR |
tdir=$TESTDIR |
64 |
if test $checkOut = '0' ; then |
updFile='updated_code' ; today=`date +%Y%m%d` |
65 |
if test -e $tdir/MITgcm/CVS ; then |
if test $checkOut != 2 ; then |
66 |
echo $tdir/MITgcm/CVS 'exist' |
if test -e $tdir/MITgcm/CVS ; then |
67 |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
echo $tdir/MITgcm/CVS 'exist' |
68 |
cd $tdir/MITgcm |
if test $sepDir = 0 -a $checkOut = 1 ; then |
69 |
if test $sepDir = 1 ; then |
#- remove date/lock-file: |
70 |
$cmdCVS update -P -d > /dev/null |
if test -f $tdir/$updFile ; then rm -f $tdir/$updFile ; sleep 2 ; fi |
71 |
|
echo -n "Update the MITgcm code using: $cmdCVS ..." |
72 |
|
cd $tdir/MITgcm |
73 |
|
$cmdCVS update -P -d |
74 |
|
echo " done" |
75 |
|
#- update date/lock-file: |
76 |
|
( cd $tdir ; echo $today > $updFile |
77 |
|
sleep 2 ; ls -l $updFile ) |
78 |
|
fi |
79 |
else |
else |
80 |
$cmdCVS update -P -d |
echo -n $tdir/MITgcm 'missing ; ' |
81 |
|
checkOut=2 |
82 |
fi |
fi |
|
echo " done" |
|
|
else |
|
|
echo -n $tdir/MITgcm 'missing ; ' |
|
|
checkOut=1 |
|
|
fi |
|
83 |
fi |
fi |
84 |
if test $checkOut = '1' ; then |
if test $checkOut = 2 ; then |
85 |
if test -e $tdir ; then |
if test -e $tdir ; then |
86 |
echo -n "Removing working copy: $tdir/MITgcm ..." |
echo -n "Removing working copy: $tdir/MITgcm ..." |
87 |
test -e $tdir/MITgcm && rm -rf $tdir/MITgcm |
test -e $tdir/MITgcm && rm -rf $tdir/MITgcm |
90 |
mkdir $tdir |
mkdir $tdir |
91 |
fi |
fi |
92 |
echo " done" |
echo " done" |
|
echo -n "Downloading the MITgcm code using: $cmdCVS ..." |
|
93 |
cd $tdir |
cd $tdir |
94 |
|
#- remove date/lock-file: |
95 |
|
if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi |
96 |
|
echo -n "Downloading the MITgcm code using: $cmdCVS ..." |
97 |
$cmdCVS co -P MITgcm > /dev/null |
$cmdCVS co -P MITgcm > /dev/null |
98 |
echo " done" |
echo " done" |
99 |
|
if test -d other_input ; then |
100 |
|
list_dirs=`(cd other_input ; ls 2> /dev/null )` |
101 |
|
echo "Updating ( $cmdCVS update -P -d ) 'other_input' extra dirs:" |
102 |
|
for exd in $list_dirs ; do |
103 |
|
if test -d other_input/$exd/CVS ; then echo " $exd" |
104 |
|
( cd other_input/$exd ; $cmdCVS update -P -d ) |
105 |
|
fi |
106 |
|
done |
107 |
|
echo " <-- update of 'other_input' dirs done" |
108 |
|
fi |
109 |
|
#- update date/lock-file: |
110 |
|
echo $today > $updFile ; sleep 2 ; ls -l $updFile |
111 |
else |
else |
112 |
cd $tdir |
cd $tdir |
113 |
fi |
fi |
119 |
for tt in $tst_list |
for tt in $tst_list |
120 |
do |
do |
121 |
|
|
122 |
echo "================================================================" |
echo "================================================================" |
123 |
typ=`echo $tt | sed 's/+rs//'` |
typ=`echo $tt | sed 's/+rs//'` |
124 |
#- check day and time: |
#- define list of additional experiences to test: |
125 |
curDay=`date +%d` ; curHour=`date +%H` |
addExp='' |
126 |
if [ $curDay -ne $TODAY ] ; then |
if test $typ = 'mp2' -o $typ = 'ifc' ; then |
127 |
date ; echo "day is over => skip test $typ" |
addExp="offline_cheapaml atm_gray" |
128 |
continue |
fi |
129 |
fi |
if test $typ = 'gfo' -o $typ = 'ifc' ; then |
130 |
if [ $curHour -ge 18 ] ; then |
addExp="$addExp global_oce_biogeo_bling" |
131 |
date ; echo "too late to run test $typ" |
addExp="$addExp shelfice_remeshing" |
132 |
continue |
fi |
133 |
fi |
if test $typ = 'mpi' ; then |
134 |
#- clean-up old output files |
addExp="$addExp global_oce_cs32" |
135 |
rm -f $tdir/output_${typ}* |
fi |
136 |
if test $sepDir = 1 ; then |
#- check day and time: |
137 |
new_dir="MITgcm_$typ" |
curDay=`date +%d` ; curHour=`date +%H` |
138 |
if test -d $new_dir/CVS -a $checkOut = '0' ; then |
if [ $curDay -ne $TODAY ] ; then |
139 |
pushd $new_dir |
date ; echo "day is over => skip test $typ" |
140 |
echo -n "Update the MITgcm code using: $cmdCVS ..." |
continue |
141 |
$cmdCVS update -P -d |
fi |
142 |
echo " done" |
if [ $curHour -ge 18 ] ; then |
143 |
|
date ; echo "too late to run test $typ" |
144 |
|
continue |
145 |
|
fi |
146 |
|
if test $sepDir = 0 -a "x$option" != x -a $tt != $last_Tst ; then |
147 |
|
echo "using option='$option' prevent multi-tests => skip test $typ" |
148 |
|
continue |
149 |
|
fi |
150 |
|
#- clean-up old output files |
151 |
|
rm -f $tdir/output_${typ}* |
152 |
|
touch $tdir/output_$tt |
153 |
|
if test $sepDir = 1 ; then |
154 |
|
new_dir="MITgcm_$typ" |
155 |
|
reUse=1 ; if [ $checkOut -ge 2 ] ; then reUse=0 ; fi |
156 |
|
if test -d $new_dir/CVS -a $reUse = 1 ; then |
157 |
|
cd $tdir/$new_dir |
158 |
|
if test $tt != $typ ; then |
159 |
|
( cd verification ; ../tools/do_tst_2+2 -clean ) |
160 |
|
fi |
161 |
|
if test $checkOut = 1 ; then |
162 |
|
echo -n "Update the MITgcm code using: $cmdCVS ..." |
163 |
|
$cmdCVS update -P -d |
164 |
|
echo " done" |
165 |
|
fi |
166 |
|
else |
167 |
|
if test -d prev ; then |
168 |
|
#-- save previous summary: |
169 |
|
oldS=`ls -t ${new_dir}/verification/tr_${outDir}_*/summary.txt 2> /dev/null | head -1` |
170 |
|
if test "x$oldS" != x ; then |
171 |
|
cat $oldS | sed '/^[YN] [YN] [YN] [YN]/ s/ \. //g' > prev/tr_out.$typ |
172 |
|
touch -r $oldS prev/tr_out.$typ |
173 |
|
fi |
174 |
|
if test $tt != $typ ; then |
175 |
|
oldS=`ls -t ${new_dir}/verification/rs_${outDir}_*/summary.txt 2> /dev/null | head -1` |
176 |
|
if test "x$oldS" != x ; then cp -p -f $oldS prev/rs_out.$typ ; fi |
177 |
|
fi |
178 |
|
fi |
179 |
|
test -e $new_dir && rm -rf $new_dir |
180 |
|
mkdir $new_dir |
181 |
|
#- before making a copy, check that code has been updated |
182 |
|
nCount=0; today=`date +%Y%m%d` |
183 |
|
updDate=0 ; test -f $updFile && updDate=`cat $updFile` |
184 |
|
while [ $today -gt $updDate ] ; do |
185 |
|
nCount=`expr $nCount + 1` |
186 |
|
if [ $nCount -gt 40 ] ; then |
187 |
|
echo " waiting too long (nCount=$nCount) for updated code" |
188 |
|
echo " today=$today , updDate=$updDate " |
189 |
|
ls -l $updFile |
190 |
|
exit |
191 |
|
fi |
192 |
|
sleep 60 |
193 |
|
updDate=0 ; test -f $updFile && updDate=`cat $updFile` |
194 |
|
done |
195 |
|
ls -l $updFile | tee -a $tdir/output_$tt |
196 |
|
echo " waited nCount=$nCount for updated code ($updDate) to copy" | tee -a $tdir/output_$tt |
197 |
|
#----------------------------- |
198 |
|
if test -d MITgcm -a -d $new_dir ; then |
199 |
|
echo " copy main code from MITgcm to $new_dir" | tee -a $tdir/output_$tt |
200 |
|
cp -ra MITgcm/* $new_dir 2>&1 | tee -a $tdir/output_$tt |
201 |
|
else |
202 |
|
if test -d MITgcm ; then |
203 |
|
echo " missing dir $new_dir --> end test $tt" | tee -a $tdir/output_$tt |
204 |
|
else |
205 |
|
echo " missing dir MITgcm --> end test $tt" | tee -a $tdir/output_$tt |
206 |
|
fi |
207 |
|
continue |
208 |
|
fi |
209 |
|
echo -n " cd $tdir/$new_dir " | tee -a $tdir/output_$tt |
210 |
|
cd $tdir/$new_dir |
211 |
|
retVal=$? |
212 |
|
( echo "(retVal= $retVal )" ; pwd ) | tee -a $tdir/output_$tt |
213 |
|
if test -d verification ; then |
214 |
|
echo " check: dir verification exist" | tee -a $tdir/output_$tt |
215 |
|
else |
216 |
|
echo " missing dir verification --> end test $tt" | tee -a $tdir/output_$tt |
217 |
|
continue |
218 |
|
fi |
219 |
|
#-- download additional experience from Contrib: |
220 |
|
for exp2add in $addExp ; do |
221 |
|
echo " add dir: $exp2add (from Contrib:verification_other)" |
222 |
|
( cd verification ; $cmdCVS co -P -d $exp2add \ |
223 |
|
MITgcm_contrib/verification_other/$exp2add > /dev/null ) |
224 |
|
if test $exp2add = 'global_oce_cs32' ; then |
225 |
|
echo " link dir 'other_input/core2_cnyf' in here" |
226 |
|
( cd verification/${exp2add} |
227 |
|
ln -s ../../../other_input/core2_cnyf . ) |
228 |
|
fi |
229 |
|
if test $exp2add = 'shelfice_remeshing' ; then |
230 |
|
echo " link dir 'other_input/remeshing_code' to 'extra_code'" |
231 |
|
( cd verification/${exp2add} |
232 |
|
ln -s ../../../other_input/remeshing_code extra_code ) |
233 |
|
fi |
234 |
|
done |
235 |
|
fi |
236 |
else |
else |
237 |
test -e $new_dir && rm -rf $new_dir |
cd $tdir/MITgcm |
|
mkdir $new_dir |
|
|
pushd $new_dir |
|
|
cp -ra ../MITgcm/* . |
|
|
fi |
|
|
else |
|
|
pushd MITgcm |
|
|
fi |
|
|
cd verification |
|
|
|
|
|
case $typ in |
|
|
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
|
|
'gfo'|'adm') OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
|
|
'ifc') OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
|
|
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
|
|
'mth') OPTFILE='../tools/build_options/linux_amd64_gfortran' |
|
|
export GOMP_STACKSIZE=400m ;; |
|
|
*) OPTFILE= ;; |
|
|
esac |
|
|
|
|
|
if test $sepDir = 0 -a $checkOut = '1' -a $tt = $firstTst ; then |
|
|
#-- cleaning: |
|
|
echo "======================" |
|
|
echo "Cleaning test directories:" |
|
|
cmdCLN="./testreport -clean" |
|
|
echo " clean dir running: $cmdCLN" |
|
|
$cmdCLN > /dev/null 2>&1 |
|
|
echo "======================" |
|
|
echo |
|
|
fi |
|
|
|
|
|
if test $typ = 'g77' |
|
|
then |
|
|
|
|
|
echo "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
|
fi |
|
|
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
|
echo " \"$comm\"" |
|
|
echo "======================" |
|
|
$comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'gfo' |
|
|
then |
|
|
|
|
|
echo "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
238 |
fi |
fi |
239 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
cd verification |
240 |
echo " \"$comm\"" |
|
241 |
echo "======================" |
#-- set the testreport command: |
242 |
$comm > $tdir/output_$typ 2>&1 |
comm="./testreport" |
243 |
tail -100 $tdir/output_$typ |
if test $typ = 'g7a' -o $typ = 'adm' -o $typ = 'mpa' ; then |
244 |
echo |
comm="$comm -adm" |
245 |
|
elif test $typ = 'oad' ; then |
246 |
fi |
comm="$comm -oad" |
247 |
|
elif test $typ = 'tlm' ; then |
248 |
if test $typ = 'g7a' |
comm="$comm -tlm" |
249 |
then |
elif test $typ = 'mth' -o $typ = 'mp2' ; then |
250 |
|
export GOMP_STACKSIZE=400m |
251 |
echo "Running testreport using:" |
export OMP_NUM_THREADS=2 |
252 |
comm="./testreport -adm -a jmc@mitgcm.org" |
comm="$comm -mth" |
253 |
# comm="$comm -match $MC" |
else |
254 |
if test "x$OPTFILE" != x ; then |
comm="$comm -md cyrus-makedepend" |
|
comm="$comm -of=$OPTFILE" |
|
255 |
fi |
fi |
256 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
comm="$comm -odir $outDir -a jmc@dev.mitgcm.org" |
257 |
echo " \"$comm\"" |
#-- set the optfile (+ mpi & match-precision) |
258 |
echo "======================" |
MPI=0 |
259 |
$comm > $tdir/output_$typ 2>&1 |
case $typ in |
260 |
tail -60 $tdir/output_$typ |
'g77'|'g7a') OPTFILE='../tools/build_options/linux_amd64_g77' ;; |
261 |
echo |
'gfo'|'adm'|'oad'|'tlm'|'mth') comm="$comm -match $MC -devel" |
262 |
|
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
263 |
fi |
'ifc') comm="$comm -devel" |
264 |
|
OPTFILE='../tools/build_options/linux_amd64_ifort11' ;; |
265 |
if test $typ = 'adm' |
'pgi') OPTFILE='../tools/build_options/linux_amd64_pgf77' ;; |
266 |
then |
'mpa'|'mpi'|'mp2') comm="$comm -match $MC -devel" ; MPI=6 |
267 |
|
OPTFILE='../tools/build_options/linux_amd64_gfortran' ;; |
268 |
echo "Running testreport using:" |
*) OPTFILE= ;; |
269 |
comm="./testreport -adm -a jmc@mitgcm.org" |
esac |
270 |
comm="$comm -match $MC" |
#-- set MPI command: |
271 |
if test "x$OPTFILE" != x ; then |
if test $MPI != 0 ; then |
272 |
comm="$comm -of=$OPTFILE" |
if test $typ = 'mp2' ; then MPI=3 ; fi |
273 |
|
if test $typ = 'mpa' ; then |
274 |
|
EXE="mpirun -np TR_NPROC ./mitgcmuv_ad" |
275 |
|
else |
276 |
|
EXE="mpirun -np TR_NPROC ./mitgcmuv" |
277 |
|
fi |
278 |
|
fi |
279 |
|
|
280 |
|
#-- set specific Env Vars: |
281 |
|
if test $typ = 'oad' ; then |
282 |
|
source ~jmc/mitgcm/bin/setenv_OpenAD.sh |
283 |
|
fi |
284 |
|
if test $typ = 'ifc' ; then |
285 |
|
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
286 |
|
fi |
287 |
|
if test $typ = 'pgi' ; then |
288 |
|
#listT='fizhi-cs-32x32x40 fizhi-cs-aqualev20' |
289 |
|
export PGI=/srv/software/pgi/pgi-10.9 |
290 |
|
export PATH="$PATH:$PGI/linux86-64/10.9/bin" |
291 |
|
export LM_LICENSE_FILE=$PGI/license.dat |
292 |
fi |
fi |
293 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
294 |
echo " \"$comm\"" |
if test $sepDir = 0 -a "x$option" = x -a $tt = $firstTst -a $checkOut != 2 ; then |
295 |
echo "======================" |
#-- cleaning: |
296 |
$comm > $tdir/output_$typ 2>&1 |
echo "======================" |
297 |
tail -60 $tdir/output_$typ |
echo "Cleaning test directories:" | tee -a $tdir/output_$tt |
298 |
echo |
cmdCLN="./testreport -clean" |
299 |
|
echo " clean dir running: $cmdCLN" | tee -a $tdir/output_$tt |
300 |
fi |
$cmdCLN >> $tdir/output_$tt 2>&1 |
301 |
|
echo "======================" |
302 |
if test $typ = 'ifc' |
echo "" | tee -a $tdir/output_$tt |
|
then |
|
|
|
|
|
source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64 |
|
|
echo "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
303 |
fi |
fi |
304 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
|
305 |
echo " \"$comm\"" |
#-- run the testreport command: |
306 |
echo "======================" |
echo -n "Running testreport using:" | tee -a $tdir/output_$tt |
|
$comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'mth' |
|
|
then |
|
|
|
|
|
export OMP_NUM_THREADS=2 |
|
|
echo "Running testreport using:" |
|
|
comm="./testreport -mth -a jmc@mitgcm.org" |
|
|
comm="$comm -match $MC" |
|
307 |
if test "x$OPTFILE" != x ; then |
if test "x$OPTFILE" != x ; then |
308 |
comm="$comm -of=$OPTFILE" |
comm="$comm -of=$OPTFILE" |
309 |
fi |
fi |
310 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
if test $MPI = 0 ; then echo '' | tee -a $tdir/output_$tt |
311 |
echo " \"$comm\"" |
else echo " (EXE='$EXE')" | tee -a $tdir/output_$tt |
312 |
echo "======================" |
comm="$comm -MPI $MPI -command \"\$EXE\"" |
|
$comm > $tdir/output_$typ 2>&1 |
|
|
tail -100 $tdir/output_$typ |
|
|
echo |
|
|
|
|
|
fi |
|
|
|
|
|
if test $typ = 'pgi' |
|
|
then |
|
|
|
|
|
export PGI=/srv/software/pgi/pgi-10.9 |
|
|
export PATH=$PGI/linux86-64/10.9/bin:$PATH |
|
|
export LM_LICENSE_FILE=$PGI/license.dat |
|
|
echo "Running testreport using:" |
|
|
comm="./testreport -a jmc@mitgcm.org" |
|
|
# comm="$comm -match $MC" |
|
|
#comm="$comm -skd tutorial_advection_in_gyre" |
|
|
if test "x$OPTFILE" != x ; then |
|
|
comm="$comm -of=$OPTFILE" |
|
313 |
fi |
fi |
314 |
if test "x$option" != x ; then comm="$comm $option" ; fi |
if test "x$option" != x ; then comm="$comm $option" ; fi |
315 |
echo " \"$comm\"" |
#if test $typ = 'pgi' ; then comm="$comm -t \"\$listT\"" ; fi |
316 |
|
echo " \"eval $comm\"" | tee -a $tdir/output_$tt |
317 |
echo "======================" |
echo "======================" |
318 |
$comm > $tdir/output_${typ} 2>&1 |
eval $comm >> $tdir/output_$tt 2>&1 |
319 |
tail -100 $tdir/output_${typ} |
sed -n "/^An email /,/^======== End of testreport / p" $tdir/output_$tt |
320 |
echo |
echo "" | tee -a $tdir/output_$tt |
|
|
|
|
fi |
|
321 |
|
|
322 |
#-- also test restart (test 2+2=4) |
#-- also test restart (test 2+2=4) |
323 |
if test $tt != $typ |
if test $tt != $typ |
324 |
then |
then |
325 |
echo "testing restart using:" |
echo "testing restart using:" | tee -a $tdir/output_$tt |
326 |
comm="../tools/do_tst_2+2 -a jmc@mitgcm.org" |
comm="../tools/do_tst_2+2 -o $outDir -a jmc@dev.mitgcm.org" |
327 |
echo " \"$comm\"" |
if test $MPI = 0 ; then |
328 |
echo "======================" |
echo " \"$comm\"" | tee -a $tdir/output_$tt |
329 |
$comm > $tdir/output_2+2 2>&1 |
echo "======================" |
330 |
#tail -100 $tdir/output_2+2 |
$comm >> $tdir/output_$tt 2>&1 |
331 |
echo ; cat tst_2+2_out.txt |
else |
332 |
echo |
echo " \"$comm -mpi -exe $EXE\"" | tee -a $tdir/output_$tt |
333 |
fi |
echo "======================" |
334 |
export OMP_NUM_THREADS=1 |
$comm -mpi -exe "$EXE" >> $tdir/output_$tt 2>&1 |
335 |
|
fi |
336 |
|
echo ; cat tst_2+2_out.txt |
337 |
|
echo |
338 |
|
fi |
339 |
|
export OMP_NUM_THREADS=1 |
340 |
|
|
341 |
if test $sepDir = 0 ; then |
if test $sepDir = 0 ; then |
342 |
#-- cleaning: |
#-- cleaning: |
343 |
echo "======================" |
echo "======================" |
344 |
echo "Cleaning test directories:" |
echo "Cleaning test directories:" | tee -a $tdir/output_$tt |
345 |
if test $tt != $typ ; then |
if test $tt != $typ ; then |
346 |
cmdCLN="../tools/do_tst_2+2 -clean" |
cmdCLN="../tools/do_tst_2+2 -clean" |
347 |
echo " clean tst_2+2 running: $cmdCLN" |
echo " clean tst_2+2 running: $cmdCLN" | tee -a $tdir/output_$tt |
348 |
$cmdCLN >> $tdir/output_2+2 2>&1 |
$cmdCLN >> $tdir/output_$tt 2>&1 |
349 |
fi |
fi |
350 |
if test $tt != $last_Tst ; then |
if test $tt != $last_Tst ; then |
351 |
cmdCLN="./testreport -clean" |
cmdCLN="./testreport -clean" |
352 |
echo " clean dir running: $cmdCLN" |
echo " clean dir running: $cmdCLN" | tee -a $tdir/output_$tt |
353 |
$cmdCLN > /dev/null 2>&1 |
$cmdCLN >> $tdir/output_$tt 2>&1 |
354 |
|
fi |
355 |
|
echo "======================" |
356 |
|
echo |
357 |
fi |
fi |
358 |
echo "======================" |
cd $tdir |
|
echo |
|
|
fi |
|
|
popd |
|
359 |
|
|
360 |
done |
done |