/[MITgcm]/MITgcm_contrib/test_scripts/other/testing_loc
ViewVC logotype

Contents of /MITgcm_contrib/test_scripts/other/testing_loc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.15 - (show annotations) (download)
Tue Jan 15 19:02:02 2013 UTC (13 years, 7 months ago) by jmc
Branch: MAIN
Changes since 1.14: +47 -4 lines
add more "-use_real4" tests with gfortran compiler

1 #! /usr/bin/env bash
2
3 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/other/testing_loc,v 1.14 2013/01/03 19:51:56 jmc Exp $
4 # $Name: $
5
6 if test $# = 0 ; then
7 echo 'need 1 argument'
8 exit
9 else
10 if test $1 = ifort ; then
11 # tst_list='iadm imp2 iur4'
12 tst_list='iad4 imp2 iur4'
13 elif test $1 = gfort ; then
14 # tst_list='gadm gads gmp2 gmpi gfo g77'
15 tst_list='gadm gads gmp2 gfo g77'
16 elif test $1 = gfor4 ; then
17 tst_list='gad4 gmp4 gfo4'
18 else
19 tst_list=$*
20 fi
21 fi
22 echo "run: \""`basename $0` $*"\" on:" `date`
23 echo " tst_list='$tst_list'"
24
25 #-- 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 for tt in $tst_list
48 do
49
50 echo "=========================================================================="
51 # 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 set -x
57 ( cd MITgcm_$tt/verification ; testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 )
58 else
59 set -x
60 #- 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 set +x
65 fi
66 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 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 if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi
83 cd MITgcm_$tt/verification
84
85 date
86 # verbose mode:
87 set -x
88 pwd
89
90 case $tt in
91 'iadm' )
92 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 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
96 echo '' >> ../../tr_run_$tt.log 2>&1
97
98 testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
99 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
100 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
101
102 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
103 ;;
104
105 '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 echo '' >> ../../tr_run_$tt.log 2>&1
111
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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
117 ;;
118
119 'imp2')
120 if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
121
122 export OMP_NUM_THREADS=2
123 export KMP_STACKSIZE=400m
124
125 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
126 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
127 echo '' >> ../../tr_run_$tt.log 2>&1
128
129 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
130 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
131 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
132
133 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
134
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 ;;
140
141 'iur4')
142 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 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
146 echo '' >> ../../tr_run_$tt.log 2>&1
147
148 testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
149 -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
150 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
151
152 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
153
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 ;;
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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
168 ;;
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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
177 ;;
178
179 '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 '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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
199
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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
214
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
221 '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 '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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
243
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 '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 '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 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
270
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
279 set +x
280 cd ../..
281
282 done

  ViewVC Help
Powered by ViewVC 1.1.22