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