/[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.14 - (hide annotations) (download)
Thu Jan 3 19:51:56 2013 UTC (12 years, 6 months ago) by jmc
Branch: MAIN
Changes since 1.13: +7 -1 lines
improve cleaning (when running 2 times testreport)

1 jmc 1.1 #! /usr/bin/env bash
2    
3 jmc 1.14 # $Header: /u/gcmpack/MITgcm_contrib/test_scripts/other/testing_loc,v 1.13 2012/08/26 18:10: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     fi
39     if [ $gfort -eq 2 ] ; then
40     echo 'source ~jmc/bin/openmpi.sh'
41     source ~jmc/bin/openmpi.sh
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 jmc 1.14 if [ $gfort -eq 0 ] ; then
61     echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log
62     ( cd MITgcm_$tt/verification ; rm -f */build/Makefile_syntax )
63     else
64     echo ' run "cvs update -P -d"' >> tr_clean_$tt.log
65     fi
66 jmc 1.1 echo ""
67    
68     echo "=========================================================================="
69     set -x
70     ( cd MITgcm_$tt ; cvs update -P -d >> ../tr_clean_$tt.log 2>&1 )
71     set +x
72     echo ""
73    
74     echo "=========================================================================="
75    
76 jmc 1.8 if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi
77 jmc 1.1 cd MITgcm_$tt/verification
78    
79     date
80     # verbose mode:
81     set -x
82     pwd
83    
84 jmc 1.9 case $tt in
85     'iadm' )
86 jmc 1.6 if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
87    
88     testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
89 jmc 1.8 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
90 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
91 jmc 1.6
92     testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
93 jmc 1.8 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
94     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
95 jmc 1.6
96 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
97 jmc 1.9 ;;
98 jmc 1.6
99 jmc 1.10 'iad4' )
100     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
101    
102     testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
103     -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
104 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
105 jmc 1.10
106     testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
107     -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
108     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
109    
110 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
111 jmc 1.10 ;;
112    
113 jmc 1.9 'imp2')
114     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
115 jmc 1.1
116     export OMP_NUM_THREADS=2
117     export KMP_STACKSIZE=400m
118    
119 jmc 1.6 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
120 jmc 1.8 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
121 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
122 jmc 1.6
123 jmc 1.5 testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
124 jmc 1.8 -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
125     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
126 jmc 1.1
127 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
128 jmc 1.1
129     #- test restart:
130     echo '' >> ../../tr_run_$tt.log 2>&1
131     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
132     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
133 jmc 1.9 ;;
134 jmc 1.1
135 jmc 1.9 'iur4')
136 jmc 1.5 if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
137    
138     testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
139 jmc 1.8 -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
140 jmc 1.12 echo '' >> ../../tr_run_$tt.log 2>&1
141 jmc 1.1
142 jmc 1.5 testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
143 jmc 1.8 -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
144 jmc 1.4 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
145 jmc 1.1
146 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
147 jmc 1.1
148     #- test restart:
149     echo '' >> ../../tr_run_$tt.log 2>&1
150     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
151     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
152 jmc 1.9 ;;
153    
154     'gadm')
155     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
156    
157     testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
158     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
159     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
160    
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     'gmp2')
174     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
175    
176     export OMP_NUM_THREADS=2
177     export GOMP_STACKSIZE=400m
178    
179     testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \
180     -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
181     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
182    
183 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
184 jmc 1.9
185     #- test restart:
186     echo '' >> ../../tr_run_$tt.log 2>&1
187     ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
188     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
189     ;;
190    
191     'gmpi')
192     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
193    
194     testreport -MPI 3 -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 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
199 jmc 1.9
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 jmc 1.1
206 jmc 1.9 'gfo')
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 -of ../tools/build_options/linux_amd64_gfortran \
210     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
211    
212 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
213 jmc 1.9
214     #- test restart:
215     echo '' >> ../../tr_run_$tt.log 2>&1
216     ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
217     ;;
218    
219     'g77')
220     if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
221    
222     testreport -of ../tools/build_options/linux_amd64_g77 \
223     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \
224     -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
225    
226 jmc 1.12 sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
227 jmc 1.9
228     #- test restart:
229     echo '' >> ../../tr_run_$tt.log 2>&1
230     ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
231     ;;
232    
233     *) echo "unrecognized test suffix '$tt' <== skipped" ;;
234     esac
235 jmc 1.1
236     set +x
237     cd ../..
238    
239     done

  ViewVC Help
Powered by ViewVC 1.1.22