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