/[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.2 by jmc, Fri Jun 3 17:59:32 2011 UTC revision 1.10 by jmc, Sun Aug 5 16:42:05 2012 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='iadm imp2 iur4 iad4'
13      elif test $1 = gfort ; then
14        tst_list='gadm gads gmp2 gmpi gfo g77'
15    #   tst_list='gadm gads gmp2 gfo g77'
16      else
17        tst_list=$*
18      fi
19    fi
20    
21    #-- for now, cannot mix ifort/gfortran tests:
22    gfort=1
23    for tt in $tst_list
24    do
25      echo $tt | grep '^g' > /dev/null 2>&1 ; retv=$?
26      if   [ $retv -eq 0 -a $gfort -ge 1 ] ; then gfort=2
27      elif [ $retv -ne 0 -a $gfort -le 1 ] ; then gfort=0
28      else echo 'cannot mix ifort/gfortran' ; exit
29      fi
30    done
31    if [ $gfort -eq 0 ] ; then
32      #echo 'source ~jmc/bin/intel_v11.sh'
33      #source ~jmc/bin/intel_v11.sh
34       echo 'source ~jmc/bin/intel_v12.sh'
35       source ~jmc/bin/intel_v12.sh
36       export GFORTRAN_OPTFILE=f
37    fi
38    if [ $gfort -eq 2 ] ; then
39       echo 'source ~jmc/bin/openmpi.sh'
40       source ~jmc/bin/openmpi.sh
41       export GFORTRAN_OPTFILE=t
42    fi
43    
44    #--------------------------------------------------------------------
45  for tt in $tst_list  for tt in $tst_list
46  do  do
47    
48    echo "=========================================================================="    echo "=========================================================================="
49    set -x    set -x
50    rm -f tr_clean_$tt.log    rm -f tr_clean_$tt.log
51    if test $tt = 'iadm' -o $tt = 'iad4' -o $tt = 'gadm' -o  $tt = 'gads' ; then
52      ( cd MITgcm_$tt/verification ; testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 )
53    else
54    #- cleanup previous restart:    #- cleanup previous restart:
55    ( 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 )
56    #- cleanup previous test:    #- cleanup previous test:
57    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )    ( cd MITgcm_$tt/verification ; testreport -clean >> ../../tr_clean_$tt.log 2>&1 )
58    fi
59    set +x    set +x
60    echo ""    echo ""
61    
# Line 33  do Line 67  do
67    
68    echo "=========================================================================="    echo "=========================================================================="
69    
70    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
71    cd MITgcm_$tt/verification    cd MITgcm_$tt/verification
72    
73    date    date
# Line 41  do Line 75  do
75    set -x    set -x
76    pwd    pwd
77    
78  if test $tt = 'mp2' ; then  case $tt in
79    'iadm' )
80      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
81    
82      testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
83       -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
84    
85      testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
86       -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
87       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
88    
89      #unset echo
90      sed -n "/ email /,$ p" ../../tr_run_$tt.log
91    ;;
92    
93    'iad4' )
94      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
95    
96      testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
97       -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
98    
99      testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
100       -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
101       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
102    
103      #unset echo
104      sed -n "/ email /,$ p" ../../tr_run_$tt.log
105    ;;
106    
107    'imp2')
108      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
109    
110    export OMP_NUM_THREADS=2    export OMP_NUM_THREADS=2
111    export KMP_STACKSIZE=400m    export KMP_STACKSIZE=400m
112    
113    testreport -MPI 2 -mth -of ../../linux_amd64_ifort+mpi_chk \    testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
114     -command='mpirun -v -np TR_NPROC ./mitgcmuv' \     -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
115     -a jmc@mitgcm.org -nc > ../../tr_run_$tt.log 2>&1  
116      testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
117       -devel -q -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
118       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
119    
   #unset echo  
120    sed -n "/ email /,$ p" ../../tr_run_$tt.log    sed -n "/ email /,$ p" ../../tr_run_$tt.log
121    
122    #- test restart:    #- test restart:
123    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
124    ../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' \
125     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
126    ;;
127    
128  fi  'iur4')
129      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
130    
131  if test $tt = 'ur4' ; then    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
132       -devel -nc -repl_mk do_make_syntax.sh -obj -dd > ../../tr_run_$tt.log 2>&1
133    
134    testreport -MPI 3 -ur4 -of ../../linux_amd64_ifort+mpi_chk \    testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
135     -nc -dd -nr > ../../tr_run_$tt.log 2>&1     -devel -q -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
136       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
137    
138    set +x    sed -n "/ email /,$ p" ../../tr_run_$tt.log
   echo '' ; echo ' remove */build/*.o */mitgcmuv'  
   /bin/rm -f */build/*.o  
   /bin/rm -f */build/mitgcmuv  
   echo ''  
   set -x  
139    
140    testreport -MPI 3 -ur4 -of ../../linux_amd64_ifort+mpi_chk \    #- test restart:
141     -match 5 -command='mpirun -v -np TR_NPROC ./mitgcmuv' \    echo '' >> ../../tr_run_$tt.log 2>&1
142     -a jmc@mitgcm.org -q >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
143       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
144    ;;
145    
146    'gadm')
147      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
148    
149      testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
150       -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv_ad' \
151       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
152    
153      sed -n "/ email /,$ p" ../../tr_run_$tt.log
154    ;;
155    
156    'gads')
157      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
158    
159      testreport -adm -of ../tools/build_options/linux_amd64_gfortran \
160       -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
161    
162      sed -n "/ email /,$ p" ../../tr_run_$tt.log
163    ;;
164    
165    'gmp2')
166      if test -e tr_out.txt ; then /bin/rm -f tr_out.sav ; mv tr_out.txt tr_out.sav ; fi
167    
168      export OMP_NUM_THREADS=2
169      export GOMP_STACKSIZE=400m
170    
171      testreport -MPI 2 -mth -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    sed -n "/ email /,$ p" ../../tr_run_$tt.log
176    
# Line 82  if test $tt = 'ur4' ; then Line 178  if test $tt = 'ur4' ; then
178    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
179    ../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' \
180     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
181    ;;
182    
183  fi  'gmpi')
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 -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \
187       -devel -nc -command='mpirun -v -np TR_NPROC ./mitgcmuv' \
188       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
189    
190      sed -n "/ email /,$ p" ../../tr_run_$tt.log
191    
192      #- test restart:
193      echo '' >> ../../tr_run_$tt.log 2>&1
194      ../tools/do_tst_2+2 -mpi -exe 'mpirun -v -np TR_NPROC ./mitgcmuv' \
195       -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
196    ;;
197    
198    'gfo')
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 -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 /,$ p" ../../tr_run_$tt.log
205    
206      #- test restart:
207      echo '' >> ../../tr_run_$tt.log 2>&1
208      ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
209    ;;
210    
211    'g77')
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 -of ../tools/build_options/linux_amd64_g77 \
215       -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \
216       -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
217    
218      sed -n "/ email /,$ p" ../../tr_run_$tt.log
219    
220      #- test restart:
221      echo '' >> ../../tr_run_$tt.log 2>&1
222      ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1
223    ;;
224    
225    *) echo "unrecognized test suffix '$tt' <== skipped" ;;
226    esac
227    
228    set +x    set +x
229    cd ../..    cd ../..

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.10

  ViewVC Help
Powered by ViewVC 1.1.22