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

Diff of /MITgcm_contrib/test_scripts/other/testing_loc

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

revision 1.1 by jmc, Wed Apr 27 21:26:07 2011 UTC revision 1.15 by jmc, Tue Jan 15 19:02:02 2013 UTC
# Line 3  Line 3 
3  # $Header$  # $Header$
4  # $Name$  # $Name$
5    
6  echo 'source ~jmc/bin/intel_64.csh'  if test $# = 0 ; then
7  source ~jmc/bin/intel_64.sh    echo 'need 1 argument'
8  tst_list='mp2 ur4'    exit
9  #tst_list='ur4'  else
10  #tst_list='mp2'    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  for tt in $tst_list
48  do  do
49    
50    echo "=========================================================================="    echo "=========================================================================="
51    set -x  # set -x
52    rm -f tr_clean_$tt.log    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:    #- cleanup previous restart:
61    ( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 )    ( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 )
62    #- cleanup previous test:    #- cleanup previous test:
63    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )
   
64    set +x    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 ""    echo ""
73    
74    echo "=========================================================================="    echo "=========================================================================="
# Line 31  do Line 79  do
79    
80    echo "=========================================================================="    echo "=========================================================================="
81    
82    mv -f tr_run_$tt.log tr_run_$tt.log_bak    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    cd MITgcm_$tt/verification
84    
85    date    date
# Line 39  do Line 87  do
87    set -x    set -x
88    pwd    pwd
89    
90  if test $tt = 'mp2' ; then  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    export OMP_NUM_THREADS=2
123    export KMP_STACKSIZE=400m    export KMP_STACKSIZE=400m
124    
125    testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort+mpi_loc \    testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
126     -command='mpirun -v -np TR_NPROC ./mitgcmuv' \     -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
127     -a jmc@mitgcm.org -nc > ../../tr_run_$tt.log 2>&1    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    #unset echo    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
   sed -n "/ email /,$ p" ../../tr_run_$tt.log  
134    
135    #- test restart:    #- test restart:
136    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
137    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
138     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
139    ;;
140    
141  fi  '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  if test $tt = 'ur4' ; then    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 ../../linux_amd64_ifort+mpi_chk \    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
149     -nc -dd -nr > ../../tr_run_$tt.log 2>&1     -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
150       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
151    
152    set +x    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
153    echo '' ; echo ' remove */build/*.o */mitgcmuv'  
154    /bin/rm -f */build/*.o    #- test restart:
155    /bin/rm -f */build/mitgcmuv    echo '' >> ../../tr_run_$tt.log 2>&1
156    echo ''    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
157    set -x     -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 -MPI 3 -ur4 -of ../../linux_amd64_ifort+mpi_chk \    testreport -adm -ur4 -match 5 -of ../tools/build_options/linux_amd64_gfortran \
183     -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
    -a jmc@mitgcm.org -q >> ../../tr_run_$tt.log 2>&1  
184    
185    sed -n "/ email /,$ p" ../../tr_run_$tt.log    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:    #- test restart:
201    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
202    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
203     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
204    ;;
205    
206  fi  '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    set +x
280    cd ../..    cd ../..

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.22