1 |
jmc |
1.1 |
#! /usr/bin/env bash |
2 |
|
|
|
3 |
jmc |
1.15 |
# $Header: /u/gcmpack/MITgcm_contrib/test_scripts/other/testing_loc,v 1.14 2013/01/03 19:51:56 jmc Exp $ |
4 |
jmc |
1.1 |
# $Name: $ |
5 |
|
|
|
6 |
jmc |
1.9 |
if test $# = 0 ; then |
7 |
|
|
echo 'need 1 argument' |
8 |
|
|
exit |
9 |
jmc |
1.6 |
else |
10 |
jmc |
1.9 |
if test $1 = ifort ; then |
11 |
jmc |
1.11 |
# tst_list='iadm imp2 iur4' |
12 |
|
|
tst_list='iad4 imp2 iur4' |
13 |
jmc |
1.9 |
elif test $1 = gfort ; then |
14 |
jmc |
1.12 |
# tst_list='gadm gads gmp2 gmpi gfo g77' |
15 |
|
|
tst_list='gadm gads gmp2 gfo g77' |
16 |
jmc |
1.15 |
elif test $1 = gfor4 ; then |
17 |
|
|
tst_list='gad4 gmp4 gfo4' |
18 |
jmc |
1.9 |
else |
19 |
|
|
tst_list=$* |
20 |
|
|
fi |
21 |
jmc |
1.6 |
fi |
22 |
jmc |
1.11 |
echo "run: \""`basename $0` $*"\" on:" `date` |
23 |
|
|
echo " tst_list='$tst_list'" |
24 |
jmc |
1.1 |
|
25 |
jmc |
1.9 |
#-- for now, cannot mix ifort/gfortran tests: |
26 |
|
|
gfort=1 |
27 |
|
|
for tt in $tst_list |
28 |
|
|
do |
29 |
|
|
echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$? |
30 |
|
|
if [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2 |
31 |
|
|
elif [ $retv -ne 0 -a $gfort -le 1 ] ; then gfort=0 |
32 |
|
|
else echo 'cannot mix ifort/gfortran' ; exit |
33 |
|
|
fi |
34 |
|
|
done |
35 |
|
|
if [ $gfort -eq 0 ] ; then |
36 |
|
|
#echo 'source ~jmc/bin/intel_v11.sh' |
37 |
|
|
#source ~jmc/bin/intel_v11.sh |
38 |
|
|
echo 'source ~jmc/bin/intel_v12.sh' |
39 |
|
|
source ~jmc/bin/intel_v12.sh |
40 |
|
|
fi |
41 |
|
|
if [ $gfort -eq 2 ] ; then |
42 |
|
|
echo 'source ~jmc/bin/openmpi.sh' |
43 |
|
|
source ~jmc/bin/openmpi.sh |
44 |
|
|
fi |
45 |
|
|
|
46 |
|
|
#-------------------------------------------------------------------- |
47 |
jmc |
1.1 |
for tt in $tst_list |
48 |
|
|
do |
49 |
|
|
|
50 |
|
|
echo "==========================================================================" |
51 |
jmc |
1.15 |
# set -x |
52 |
|
|
rm -f tr_clean_$tt.log |
53 |
|
|
echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$? |
54 |
|
|
echo " testing tt= $tt , fwd= $fwd" |
55 |
|
|
if [ $fwd -eq 0 ] ; then |
56 |
jmc |
1.1 |
set -x |
57 |
jmc |
1.9 |
( cd MITgcm_$tt/verification ; testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 ) |
58 |
|
|
else |
59 |
jmc |
1.15 |
set -x |
60 |
jmc |
1.1 |
#- cleanup previous restart: |
61 |
|
|
( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 ) |
62 |
|
|
#- cleanup previous test: |
63 |
|
|
( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 ) |
64 |
jmc |
1.15 |
set +x |
65 |
jmc |
1.6 |
fi |
66 |
jmc |
1.14 |
if [ $gfort -eq 0 ] ; then |
67 |
|
|
echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log |
68 |
|
|
( cd MITgcm_$tt/verification ; rm -f */build/Makefile_syntax ) |
69 |
|
|
else |
70 |
|
|
echo ' run "cvs update -P -d"' >> tr_clean_$tt.log |
71 |
|
|
fi |
72 |
jmc |
1.1 |
echo "" |
73 |
|
|
|
74 |
|
|
echo "==========================================================================" |
75 |
|
|
set -x |
76 |
|
|
( cd MITgcm_$tt ; cvs update -P -d >> ../tr_clean_$tt.log 2>&1 ) |
77 |
|
|
set +x |
78 |
|
|
echo "" |
79 |
|
|
|
80 |
|
|
echo "==========================================================================" |
81 |
|
|
|
82 |
jmc |
1.8 |
if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi |
83 |
jmc |
1.1 |
cd MITgcm_$tt/verification |
84 |
|
|
|
85 |
|
|
date |
86 |
|
|
# verbose mode: |
87 |
|
|
set -x |
88 |
|
|
pwd |
89 |
|
|
|
90 |
jmc |
1.9 |
case $tt in |
91 |
|
|
'iadm' ) |
92 |
jmc |
1.6 |
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
93 |
|
|
|
94 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
95 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
96 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
97 |
jmc |
1.6 |
|
98 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
99 |
jmc |
1.8 |
-devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \ |
100 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
101 |
jmc |
1.6 |
|
102 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
103 |
jmc |
1.9 |
;; |
104 |
jmc |
1.6 |
|
105 |
jmc |
1.10 |
'iad4' ) |
106 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
107 |
|
|
|
108 |
|
|
testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
109 |
|
|
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
110 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
111 |
jmc |
1.10 |
|
112 |
|
|
testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
113 |
|
|
-devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \ |
114 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
115 |
|
|
|
116 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
117 |
jmc |
1.10 |
;; |
118 |
|
|
|
119 |
jmc |
1.9 |
'imp2') |
120 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
121 |
jmc |
1.1 |
|
122 |
|
|
export OMP_NUM_THREADS=2 |
123 |
|
|
export KMP_STACKSIZE=400m |
124 |
|
|
|
125 |
jmc |
1.6 |
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
126 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
127 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
128 |
jmc |
1.6 |
|
129 |
jmc |
1.5 |
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
130 |
jmc |
1.8 |
-devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv' \ |
131 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
132 |
jmc |
1.1 |
|
133 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
134 |
jmc |
1.1 |
|
135 |
|
|
#- test restart: |
136 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
137 |
|
|
../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \ |
138 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
139 |
jmc |
1.9 |
;; |
140 |
jmc |
1.1 |
|
141 |
jmc |
1.9 |
'iur4') |
142 |
jmc |
1.5 |
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
143 |
|
|
|
144 |
|
|
testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
145 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
146 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
147 |
jmc |
1.1 |
|
148 |
jmc |
1.5 |
testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
149 |
jmc |
1.8 |
-devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \ |
150 |
jmc |
1.4 |
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
151 |
jmc |
1.1 |
|
152 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
153 |
jmc |
1.1 |
|
154 |
|
|
#- test restart: |
155 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
156 |
|
|
../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \ |
157 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
158 |
jmc |
1.9 |
;; |
159 |
|
|
|
160 |
|
|
'gadm') |
161 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
162 |
|
|
|
163 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \ |
164 |
|
|
-devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \ |
165 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
166 |
|
|
|
167 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
168 |
jmc |
1.9 |
;; |
169 |
|
|
|
170 |
|
|
'gads') |
171 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
172 |
|
|
|
173 |
|
|
testreport -adm -of ../tools/build_options/linux_amd64_gfortran \ |
174 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
175 |
|
|
|
176 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
177 |
jmc |
1.9 |
;; |
178 |
|
|
|
179 |
jmc |
1.15 |
'gad4') |
180 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
181 |
|
|
|
182 |
|
|
testreport -adm -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \ |
183 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
184 |
|
|
|
185 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
186 |
|
|
;; |
187 |
|
|
|
188 |
jmc |
1.9 |
'gmp2') |
189 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
190 |
|
|
|
191 |
|
|
export OMP_NUM_THREADS=2 |
192 |
|
|
export GOMP_STACKSIZE=400m |
193 |
|
|
|
194 |
|
|
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \ |
195 |
|
|
-devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \ |
196 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
197 |
|
|
|
198 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
199 |
jmc |
1.9 |
|
200 |
|
|
#- test restart: |
201 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
202 |
|
|
../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \ |
203 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
204 |
|
|
;; |
205 |
|
|
|
206 |
|
|
'gmpi') |
207 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
208 |
|
|
|
209 |
|
|
testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \ |
210 |
|
|
-devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \ |
211 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
212 |
|
|
|
213 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
214 |
jmc |
1.9 |
|
215 |
|
|
#- test restart: |
216 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
217 |
|
|
../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \ |
218 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
219 |
|
|
;; |
220 |
jmc |
1.1 |
|
221 |
jmc |
1.15 |
'gmp4') |
222 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
223 |
|
|
|
224 |
|
|
testreport -MPI 3 -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \ |
225 |
|
|
-devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \ |
226 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
227 |
|
|
|
228 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
229 |
|
|
|
230 |
|
|
#- test restart: |
231 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
232 |
|
|
../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \ |
233 |
|
|
-a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
234 |
|
|
;; |
235 |
|
|
|
236 |
jmc |
1.9 |
'gfo') |
237 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
238 |
|
|
|
239 |
|
|
testreport -of ../tools/build_options/linux_amd64_gfortran \ |
240 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
241 |
|
|
|
242 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
243 |
jmc |
1.9 |
|
244 |
|
|
#- test restart: |
245 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
246 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
247 |
|
|
;; |
248 |
|
|
|
249 |
jmc |
1.15 |
'gfo4') |
250 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
251 |
|
|
|
252 |
|
|
testreport -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \ |
253 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
254 |
|
|
|
255 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
256 |
|
|
|
257 |
|
|
#- test restart: |
258 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
259 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
260 |
|
|
;; |
261 |
|
|
|
262 |
jmc |
1.9 |
'g77') |
263 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
264 |
|
|
|
265 |
|
|
testreport -of ../tools/build_options/linux_amd64_g77 \ |
266 |
|
|
-skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \ |
267 |
|
|
-nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
268 |
|
|
|
269 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
270 |
jmc |
1.9 |
|
271 |
|
|
#- test restart: |
272 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
273 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
274 |
|
|
;; |
275 |
|
|
|
276 |
|
|
*) echo "unrecognized test suffix '$tt' <== skipped" ;; |
277 |
|
|
esac |
278 |
jmc |
1.1 |
|
279 |
|
|
set +x |
280 |
|
|
cd ../.. |
281 |
|
|
|
282 |
|
|
done |