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

Annotation of /MITgcm_contrib/test_scripts/other/testing_loc

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


Revision 1.16 - (hide annotations) (download)
Sat Feb 2 16:49:20 2013 UTC (12 years, 5 months ago) by jmc
Branch: MAIN
Changes since 1.15: +2 -1 lines
adjust previous changes

1 jmc 1.1 #! /usr/bin/env bash
2    
3 jmc 1.16 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/other/testing_loc,v 1.15 2013/01/15 19:02:02 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 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.8 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
101     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
102 jmc 1.6
103 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
104 jmc 1.9 ;;
105 jmc 1.6
106 jmc 1.10 'iad4' )
107     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
108    
109     testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
110     -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
111 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
112 jmc 1.10
113     testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
114     -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
115     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
116    
117 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
118 jmc 1.10 ;;
119    
120 jmc 1.9 'imp2')
121     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
122 jmc 1.1
123     export OMP_NUM_THREADS=2
124     export KMP_STACKSIZE=400m
125    
126 jmc 1.6 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
127 jmc 1.8 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
128 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
129 jmc 1.6
130 jmc 1.5 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
131 jmc 1.8 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
132     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
133 jmc 1.1
134 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
135 jmc 1.1
136     #- test restart:
137     echo '' >> ../../tr_run_$tt.log 2>&1
138     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
139     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
140 jmc 1.9 ;;
141 jmc 1.1
142 jmc 1.9 'iur4')
143 jmc 1.5 if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
144    
145     testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
146 jmc 1.8 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
147 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
148 jmc 1.1
149 jmc 1.5 testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
150 jmc 1.8 -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
151 jmc 1.4 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
152 jmc 1.1
153 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
154 jmc 1.1
155     #- test restart:
156     echo '' >> ../../tr_run_$tt.log 2>&1
157     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
158     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
159 jmc 1.9 ;;
160    
161     'gadm')
162     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
163    
164     testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
165     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
166     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
167    
168 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
169 jmc 1.9 ;;
170    
171     'gads')
172     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
173    
174     testreport -adm -of ../tools/build_options/linux_amd64_gfortran \
175     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
176    
177 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
178 jmc 1.9 ;;
179    
180 jmc 1.15 'gad4')
181     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
182    
183     testreport -adm -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \
184     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
185    
186     sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
187     ;;
188    
189 jmc 1.9 'gmp2')
190     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
191    
192     export OMP_NUM_THREADS=2
193     export GOMP_STACKSIZE=400m
194    
195     testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \
196     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
197     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
198    
199 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
200 jmc 1.9
201     #- test restart:
202     echo '' >> ../../tr_run_$tt.log 2>&1
203     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
204     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
205     ;;
206    
207     'gmpi')
208     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
209    
210     testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \
211     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
212     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
213    
214 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
215 jmc 1.9
216     #- test restart:
217     echo '' >> ../../tr_run_$tt.log 2>&1
218     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
219     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
220     ;;
221 jmc 1.1
222 jmc 1.15 'gmp4')
223     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
224    
225     testreport -MPI 3 -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \
226     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
227     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
228    
229     sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
230    
231     #- test restart:
232     echo '' >> ../../tr_run_$tt.log 2>&1
233     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
234     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
235     ;;
236    
237 jmc 1.9 'gfo')
238     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
239    
240     testreport -of ../tools/build_options/linux_amd64_gfortran \
241     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
242    
243 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
244 jmc 1.9
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.15 'gfo4')
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 -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \
254     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
255    
256     sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
257    
258     #- test restart:
259     echo '' >> ../../tr_run_$tt.log 2>&1
260     ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
261     ;;
262    
263 jmc 1.9 'g77')
264     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
265    
266     testreport -of ../tools/build_options/linux_amd64_g77 \
267     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \
268     -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
269    
270 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
271 jmc 1.9
272     #- test restart:
273     echo '' >> ../../tr_run_$tt.log 2>&1
274     ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
275     ;;
276    
277     *) echo "unrecognized test suffix '$tt' <== skipped" ;;
278     esac
279 jmc 1.1
280     set +x
281     cd ../..
282    
283     done

  ViewVC Help
Powered by ViewVC 1.1.22