1 |
jmc |
1.1 |
#! /usr/bin/env bash |
2 |
|
|
|
3 |
jmc |
1.17 |
# $Header: /u/gcmpack/MITgcm_contrib/test_scripts/other/testing_loc,v 1.16 2013/02/02 16:49:20 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 |
jmc |
1.17 |
tst_list='gadm gads gmp2 gfo' |
16 |
jmc |
1.15 |
elif test $1 = gfor4 ; then |
17 |
jmc |
1.17 |
tst_list='gad4 gmp4 gfo4 g77' |
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 |
jmc |
1.16 |
set +x |
59 |
jmc |
1.9 |
else |
60 |
jmc |
1.15 |
set -x |
61 |
jmc |
1.1 |
#- cleanup previous restart: |
62 |
|
|
( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 ) |
63 |
|
|
#- cleanup previous test: |
64 |
|
|
( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 ) |
65 |
jmc |
1.15 |
set +x |
66 |
jmc |
1.6 |
fi |
67 |
jmc |
1.14 |
if [ $gfort -eq 0 ] ; then |
68 |
|
|
echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log |
69 |
|
|
( cd MITgcm_$tt/verification ; rm -f */build/Makefile_syntax ) |
70 |
|
|
else |
71 |
|
|
echo ' run "cvs update -P -d"' >> tr_clean_$tt.log |
72 |
|
|
fi |
73 |
jmc |
1.1 |
echo "" |
74 |
|
|
|
75 |
|
|
echo "==========================================================================" |
76 |
|
|
set -x |
77 |
|
|
( cd MITgcm_$tt ; cvs update -P -d >> ../tr_clean_$tt.log 2>&1 ) |
78 |
|
|
set +x |
79 |
|
|
echo "" |
80 |
|
|
|
81 |
|
|
echo "==========================================================================" |
82 |
|
|
|
83 |
jmc |
1.8 |
if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi |
84 |
jmc |
1.1 |
cd MITgcm_$tt/verification |
85 |
|
|
|
86 |
|
|
date |
87 |
|
|
# verbose mode: |
88 |
|
|
set -x |
89 |
|
|
pwd |
90 |
|
|
|
91 |
jmc |
1.9 |
case $tt in |
92 |
|
|
'iadm' ) |
93 |
jmc |
1.6 |
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
94 |
|
|
|
95 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
96 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
97 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
98 |
jmc |
1.6 |
|
99 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \ |
100 |
jmc |
1.17 |
-devel -q -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 |
jmc |
1.17 |
-devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
114 |
jmc |
1.10 |
|
115 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
116 |
jmc |
1.10 |
;; |
117 |
|
|
|
118 |
jmc |
1.9 |
'imp2') |
119 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
120 |
jmc |
1.1 |
|
121 |
|
|
export OMP_NUM_THREADS=2 |
122 |
|
|
export KMP_STACKSIZE=400m |
123 |
|
|
|
124 |
jmc |
1.6 |
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
125 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
126 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
127 |
jmc |
1.6 |
|
128 |
jmc |
1.5 |
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \ |
129 |
jmc |
1.17 |
-devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
130 |
jmc |
1.1 |
|
131 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
132 |
jmc |
1.1 |
|
133 |
|
|
#- test restart: |
134 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
135 |
jmc |
1.17 |
../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
136 |
jmc |
1.9 |
;; |
137 |
jmc |
1.1 |
|
138 |
jmc |
1.9 |
'iur4') |
139 |
jmc |
1.5 |
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
140 |
|
|
|
141 |
|
|
testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
142 |
jmc |
1.8 |
-devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1 |
143 |
jmc |
1.12 |
echo '' >> ../../tr_run_$tt.log 2>&1 |
144 |
jmc |
1.1 |
|
145 |
jmc |
1.5 |
testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \ |
146 |
jmc |
1.17 |
-devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
147 |
jmc |
1.1 |
|
148 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
149 |
jmc |
1.1 |
|
150 |
|
|
#- test restart: |
151 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
152 |
jmc |
1.17 |
../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
153 |
jmc |
1.9 |
;; |
154 |
|
|
|
155 |
|
|
'gadm') |
156 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
157 |
|
|
|
158 |
|
|
testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \ |
159 |
jmc |
1.17 |
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
160 |
jmc |
1.9 |
|
161 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
162 |
jmc |
1.9 |
;; |
163 |
|
|
|
164 |
|
|
'gads') |
165 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
166 |
|
|
|
167 |
|
|
testreport -adm -of ../tools/build_options/linux_amd64_gfortran \ |
168 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
169 |
|
|
|
170 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
171 |
jmc |
1.9 |
;; |
172 |
|
|
|
173 |
jmc |
1.15 |
'gad4') |
174 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
175 |
|
|
|
176 |
jmc |
1.17 |
testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
177 |
|
|
-devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
178 |
jmc |
1.15 |
|
179 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
180 |
|
|
;; |
181 |
|
|
|
182 |
jmc |
1.9 |
'gmp2') |
183 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
184 |
|
|
|
185 |
|
|
export OMP_NUM_THREADS=2 |
186 |
|
|
export GOMP_STACKSIZE=400m |
187 |
|
|
|
188 |
|
|
testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \ |
189 |
jmc |
1.17 |
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
190 |
jmc |
1.9 |
|
191 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
192 |
jmc |
1.9 |
|
193 |
|
|
#- test restart: |
194 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
195 |
jmc |
1.17 |
../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
196 |
jmc |
1.9 |
;; |
197 |
|
|
|
198 |
|
|
'gmpi') |
199 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
200 |
|
|
|
201 |
|
|
testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \ |
202 |
jmc |
1.17 |
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
203 |
jmc |
1.9 |
|
204 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
205 |
jmc |
1.9 |
|
206 |
|
|
#- test restart: |
207 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
208 |
jmc |
1.17 |
../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
209 |
jmc |
1.9 |
;; |
210 |
jmc |
1.1 |
|
211 |
jmc |
1.15 |
'gmp4') |
212 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
213 |
|
|
|
214 |
jmc |
1.17 |
testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
215 |
|
|
-devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
216 |
jmc |
1.15 |
|
217 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
218 |
|
|
|
219 |
|
|
#- test restart: |
220 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
221 |
jmc |
1.17 |
../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
222 |
jmc |
1.15 |
;; |
223 |
|
|
|
224 |
jmc |
1.9 |
'gfo') |
225 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
226 |
|
|
|
227 |
|
|
testreport -of ../tools/build_options/linux_amd64_gfortran \ |
228 |
|
|
-devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
229 |
|
|
|
230 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
231 |
jmc |
1.9 |
|
232 |
|
|
#- test restart: |
233 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
234 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
235 |
|
|
;; |
236 |
|
|
|
237 |
jmc |
1.15 |
'gfo4') |
238 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
239 |
|
|
|
240 |
jmc |
1.17 |
testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \ |
241 |
|
|
-devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
242 |
jmc |
1.15 |
|
243 |
|
|
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
244 |
|
|
|
245 |
|
|
#- test restart: |
246 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
247 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
248 |
|
|
;; |
249 |
|
|
|
250 |
jmc |
1.9 |
'g77') |
251 |
|
|
if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi |
252 |
|
|
|
253 |
|
|
testreport -of ../tools/build_options/linux_amd64_g77 \ |
254 |
|
|
-skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \ |
255 |
|
|
-nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
256 |
|
|
|
257 |
jmc |
1.12 |
sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log |
258 |
jmc |
1.9 |
|
259 |
|
|
#- test restart: |
260 |
|
|
echo '' >> ../../tr_run_$tt.log 2>&1 |
261 |
|
|
../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1 |
262 |
|
|
;; |
263 |
|
|
|
264 |
|
|
*) echo "unrecognized test suffix '$tt' <== skipped" ;; |
265 |
|
|
esac |
266 |
jmc |
1.1 |
|
267 |
|
|
set +x |
268 |
|
|
cd ../.. |
269 |
|
|
|
270 |
|
|
done |