/[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.3 by jmc, Mon Jul 11 22:58:30 2011 UTC revision 1.17 by jmc, Mon Sep 23 15:32:48 2013 UTC
# Line 3  Line 3 
3  # $Header$  # $Header$
4  # $Name$  # $Name$
5    
6  #echo 'source ~jmc/bin/intel_v11.sh'  if test $# = 0 ; then
7  #source ~jmc/bin/intel_v11.sh    echo 'need 1 argument'
8   echo 'source ~jmc/bin/intel_v12.sh'    exit
9   source ~jmc/bin/intel_v12.sh  else
10  tst_list='mp2 ur4'    if test $1 = ifort ; then
11  #tst_list='ur4'  #   tst_list='iadm imp2 iur4'
12  #tst_list='mp2'      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'
16      elif test $1 = gfor4 ; then
17        tst_list='gad4 gmp4 gfo4 g77'
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      set +x
59    else
60      set -x
61    #- cleanup previous restart:    #- cleanup previous restart:
62    ( 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 )
63    #- cleanup previous test:    #- cleanup previous test:
64    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )
   
65    set +x    set +x
66    fi
67      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    echo ""    echo ""
74    
75    echo "=========================================================================="    echo "=========================================================================="
# Line 33  do Line 80  do
80    
81    echo "=========================================================================="    echo "=========================================================================="
82    
83    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
84    cd MITgcm_$tt/verification    cd MITgcm_$tt/verification
85    
86    date    date
# Line 41  do Line 88  do
88    set -x    set -x
89    pwd    pwd
90    
91  if test $tt = 'mp2' ; then  case $tt in
92    'iadm' )
93      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       -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
97      echo '' >> ../../tr_run_$tt.log 2>&1
98    
99      testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
100       -devel -q -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 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
114    
115      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
116    ;;
117    
118    'imp2')
119      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
120    
121    export OMP_NUM_THREADS=2    export OMP_NUM_THREADS=2
122    export KMP_STACKSIZE=400m    export KMP_STACKSIZE=400m
123    
124    testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11+mpi_generic \    testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
125     -devel -command='mpirun -v -np TR_NPROC ./mitgcmuv' \     -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
126     -a jmc@mitgcm.org -nc > ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
127    
128      testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
129       -devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
130    
131    #unset echo    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
   sed -n "/ email /,$ p" ../../tr_run_$tt.log  
132    
133    #- test restart:    #- test restart:
134    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
135    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
136     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1  ;;
137    
138  fi  'iur4')
139      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
140    
141  if test $tt = 'ur4' ; then    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
142       -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
143      echo '' >> ../../tr_run_$tt.log 2>&1
144    
145    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11+mpi_generic \    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
146     -devel -nc -dd -nr > ../../tr_run_$tt.log 2>&1     -devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
147    
148    set +x    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
149    echo '' ; echo ' remove */build/*.o */mitgcmuv'  
150    /bin/rm -f */build/*.o    #- test restart:
151    /bin/rm -f */build/mitgcmuv    echo '' >> ../../tr_run_$tt.log 2>&1
152    echo ''    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
153    set -x  ;;
154    
155    'gadm')
156      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
157    
158      testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
159       -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
160    
161      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
162    ;;
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      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
171    ;;
172    
173    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11+mpi_generic \  'gad4')
174     -devel -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \    if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
    -a jmc@mitgcm.org -q >> ../../tr_run_$tt.log 2>&1  
175    
176    sed -n "/ email /,$ p" ../../tr_run_$tt.log    testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \
177       -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
178    
179      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
180    ;;
181    
182    'gmp2')
183      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
184    
185      export OMP_NUM_THREADS=2
186      export GOMP_STACKSIZE=400m
187    
188      testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \
189       -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
190    
191      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
192    
193    #- test restart:    #- test restart:
194    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
195    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
196     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1  ;;
197    
198  fi  'gmpi')
199      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
200    
201      testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \
202       -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
203    
204      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
205    
206      #- test restart:
207      echo '' >> ../../tr_run_$tt.log 2>&1
208      ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
209    ;;
210    
211    'gmp4')
212      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
213    
214      testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \
215       -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
216    
217      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
218    
219      #- test restart:
220      echo '' >> ../../tr_run_$tt.log 2>&1
221      ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
222    ;;
223    
224    'gfo')
225      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
226    
227      testreport -of ../tools/build_options/linux_amd64_gfortran \
228       -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
229    
230      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
231    
232      #- test restart:
233      echo '' >> ../../tr_run_$tt.log 2>&1
234      ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
235    ;;
236    
237    'gfo4')
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 -ur4 -of ../tools/build_options/linux_amd64_gfortran \
241       -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
242    
243      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
244    
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    'g77')
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 -of ../tools/build_options/linux_amd64_g77 \
254       -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \
255       -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
256    
257      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
258    
259      #- test restart:
260      echo '' >> ../../tr_run_$tt.log 2>&1
261      ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
262    ;;
263    
264    *) echo "unrecognized test suffix '$tt' <== skipped" ;;
265    esac
266    
267    set +x    set +x
268    cd ../..    cd ../..

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.17

  ViewVC Help
Powered by ViewVC 1.1.22