/[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.9 - (show annotations) (download)
Mon Jul 9 18:41:07 2012 UTC (14 years, 1 month ago) by jmc
Branch: MAIN
Changes since 1.8: +128 -24 lines
add some gfortran with OpenMPI tests

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

  ViewVC Help
Powered by ViewVC 1.1.22