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

Diff of /MITgcm_contrib/test_scripts/other/test_local

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

revision 1.2 by jmc, Mon Aug 3 15:54:05 2015 UTC revision 1.7 by jmc, Wed Nov 7 23:10:02 2018 UTC
# Line 13  else Line 13  else
13      dd1=`date +%d -d "1 day"`      dd1=`date +%d -d "1 day"`
14  #   if test $dd1 != '01' ; then echo 'not last day of month'; exit ; fi  #   if test $dd1 != '01' ; then echo 'not last day of month'; exit ; fi
15    elif test $1 = gfort ; then    elif test $1 = gfort ; then
16        tst_list='gadm gads gad4 gmp4 gmp2 gfo gfo4 g77'
17      elif test $1 = gfor8 ; then
18  #   tst_list='gadm gads gmp2 gmpi gfo g77'  #   tst_list='gadm gads gmp2 gmpi gfo g77'
19      tst_list='gadm gads gmp2 gfo'      tst_list='gadm gads gmp2 gfo'
20    elif test $1 = gfor4 ; then    elif test $1 = gfor4 ; then
# Line 34  fi Line 36  fi
36  #- Turn off stack limit for FIZHI & AD-tests  #- Turn off stack limit for FIZHI & AD-tests
37  ulimit -s unlimited  ulimit -s unlimited
38  #- method to acces CVS:  #- method to acces CVS:
39  cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
40    #- and which GitHub repository to use:
41      git_repo='MITgcm';  git_code='MITgcm'
42     #git_repo='altMITgcm'; #git_code='MITgcm66h'
43    #- other settings:
44    tmpFil="/tmp/"`basename $0`".$$"
45    mAddr='jm_c@mitgcm.org'
46    
47  #-- for now, cannot mix ifort/gfortran tests:  #-- for now, cannot mix ifort/gfortran tests:
48  gfort=1  gfort=1
# Line 61  fi Line 69  fi
69  for tt in $tst_list  for tt in $tst_list
70  do  do
71    
72      gcmDIR="MITgcm_$tt"
73    echo "=========================================================================="    echo "=========================================================================="
74  # set -x  # set -x
75    rm -f tr_clean_$tt.log    rm -f tr_clean_$tt.log
76    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?
77    echo " testing tt= $tt , fwd= $fwd"    echo " testing tt= $tt , fwd= $fwd"
78   if test -d MITgcm_$tt/verification ; then   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then
79   #- cleaning previous testreport run and updating the code:   #- cleaning previous testreport run and updating the code:
80    if [ $fwd -eq 0 ] ; then    if [ $fwd -eq 0 ] ; then
81     set -x     set -x
82    #- cleanup previous test:    #- cleanup previous test:
83     ( cd MITgcm_$tt/verification ; ./testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 )     ( cd $gcmDIR/verification ; ./testreport -adm -clean > ../../tr_clean_$tt.log 2>&1 )
84     set +x     set +x
85    else    else
86     set -x     set -x
87    #- cleanup previous restart:    #- cleanup previous restart:
88     ( cd MITgcm_$tt/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 )     ( cd $gcmDIR/verification ; ../tools/do_tst_2+2 -clean > ../../tr_clean_$tt.log 2>&1 )
89    #- cleanup previous test:    #- cleanup previous test:
90     ( cd MITgcm_$tt/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 )     ( cd $gcmDIR/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 )
91     set +x     set +x
92    fi    fi
93    if [ $gfort -eq 0 ] ; then    if [ $gfort -eq 0 ] ; then
94      echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log      echo ' remove all Makefile_syntax' >> tr_clean_$tt.log
95      ( cd MITgcm_$tt/verification ; rm -f */build/Makefile_syntax )      ( cd $gcmDIR/verification ; rm -f */build/Makefile_syntax )
   else  
     echo " run '$cmdCVS update -P -d'"  >> tr_clean_$tt.log  
96    fi    fi
97    echo ""    echo "" >> tr_clean_$tt.log
98    
99    echo "=========================================================================="    echo "==========================================================================" \
100           >> tr_clean_$tt.log
101      echo " Update MITgcm code in dir: $gcmDIR using 'git pull':" | tee -a tr_clean_$tt.log
102    set -x    set -x
103    #- update the code:    #- update the code:
104    ( cd MITgcm_$tt ; $cmdCVS update -P -d  >> ../tr_clean_$tt.log 2>&1 )    ( cd $gcmDIR ; git pull )                             >> tr_clean_$tt.log 2>&1 ; retv=$?
105      set +x
106      if test $retv != 0 ; then
107        echo "'git pull' in $gcmDIR fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log
108        continue
109      fi
110      echo "  and checkout master:"                         | tee -a tr_clean_$tt.log
111      set -x
112      ( cd $gcmDIR ; git checkout master -- . )             >> tr_clean_$tt.log 2>&1
113    set +x    set +x
114   else   else
115      echo "Missing '$gcmDIR/.git/config' or dir '$gcmDIR/verification'" >> tr_clean_$tt.log
116      if test -e $gcmDIR ; then
117        echo -n " removing working copy: $gcmDIR ..."       >> tr_clean_$tt.log
118        rm -rf $gcmDIR
119        echo "  done"                                       >> tr_clean_$tt.log
120      fi
121   #- download new code:   #- download new code:
122    echo " run '$cmdCVS co -P -d  MITgcm_$tt MITgcm'"  >> tr_clean_$tt.log    echo "==========================================================================" \
123    echo "=========================================================================="         >> tr_clean_$tt.log
124      echo "Make a clone of $git_code from repo: $git_repo into: $gcmDIR ..." | tee -a  tr_clean_$tt.log
125    set -x    set -x
126      $cmdCVS co -P -d  MITgcm_$tt MITgcm >> tr_clean_$tt.log 2>&1    git clone https://github.com/$git_repo/${git_code}.git $gcmDIR 2> $tmpFil
127      retv=$?
128    set +x    set +x
129      if test $retv = 0 ; then
130        echo '  done' >> tr_clean_$tt.log ; rm -f $tmpFil
131      else
132        echo "'git clone' into $gcmDIR failed (return: $retv) => skip" | tee -a tr_clean_$tt.log
133        cat $tmpFil >> tr_clean_$tt.log ; rm -f $tmpFil
134        continue
135      fi
136   fi   fi
137    echo ""    echo ""
138    echo "=========================================================================="    echo "=========================================================================="
139    
140   if test -d MITgcm_$tt/verification ; then   if test -d $gcmDIR/verification ; then
141    if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi    if test -e tr_run_$tt.log ; then mv -f tr_run_$tt.log tr_run_$tt.log_bak ; fi
142    cd MITgcm_$tt/verification    cd $gcmDIR/verification
143    
144    date    date
145    # verbose mode:    # verbose mode:
# Line 123  case $tt in Line 155  case $tt in
155    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
156    
157    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
158     -devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -a $mAddr >> ../../tr_run_$tt.log 2>&1
159    
160    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
161  ;;  ;;
# Line 135  case $tt in Line 167  case $tt in
167    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
168    
169    ./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
170     -devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1
171    
172    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
173  ;;  ;;
# Line 150  case $tt in Line 182  case $tt in
182    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
183    
184    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
185     -devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -a $mAddr >> ../../tr_run_$tt.log 2>&1
186    
187    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
188    
189    #- test restart:    #- test restart:
190    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
191    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1
192  ;;  ;;
193    
194  'iur4')  'iur4')
# Line 166  case $tt in Line 198  case $tt in
198    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
199    
200    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
201     -devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1
202    
203    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
204    
205    #- test restart:    #- test restart:
206    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
207    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1
208  ;;  ;;
209    
210  'gadm')  'gadm')
211    
212    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
213     -devel -ncad -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
214    
215    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
216  ;;  ;;
# Line 186  case $tt in Line 218  case $tt in
218  'gads')  'gads')
219    
220    ./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \
221     -devel -ncad -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
222    
223    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
224  ;;  ;;
# Line 194  case $tt in Line 226  case $tt in
226  'gad4')  'gad4')
227    
228    ./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \
229     -devel -ncad -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1
230    
231    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
232  ;;  ;;
# Line 205  case $tt in Line 237  case $tt in
237    export GOMP_STACKSIZE=400m    export GOMP_STACKSIZE=400m
238    
239    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \
240     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
241    
242    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
243    
244    #- test restart:    #- test restart:
245    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
246    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1
247  ;;  ;;
248    
249  'gmpi')  'gmpi')
250    
251    ./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \
252     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
253    
254    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
255    
256    #- test restart:    #- test restart:
257    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
258    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1
259  ;;  ;;
260    
261  'gmp4')  'gmp4')
262    
263    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \
264     -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1
265    
266    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
267    
268    #- test restart:    #- test restart:
269    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
270    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi -a $mAddr >> ../../tr_run_$tt.log 2>&1
271  ;;  ;;
272    
273  'gfo')  'gfo')
274    
275    ./testreport -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -of ../tools/build_options/linux_amd64_gfortran \
276     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
277    
278    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
279    
280    #- test restart:    #- test restart:
281    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
282    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1
283  ;;  ;;
284    
285  'gfo4')  'gfo4')
286    
287    ./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \
288     -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -match 5 -a $mAddr >> ../../tr_run_$tt.log 2>&1
289    
290    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
291    
292    #- test restart:    #- test restart:
293    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
294    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1
295  ;;  ;;
296    
297  'g77')  'g77')
298    
299    ./testreport -of ../tools/build_options/linux_amd64_g77 \    ./testreport -of ../tools/build_options/linux_amd64_g77 \
300     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \
301     -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -nc -a $mAddr >> ../../tr_run_$tt.log 2>&1
302    
303    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
304    
305    #- test restart:    #- test restart:
306    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
307    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -a $mAddr >> ../../tr_run_$tt.log 2>&1
308  ;;  ;;
309    
310  *) echo "unrecognized test suffix '$tt' <== skipped" ;;  *) echo "unrecognized test suffix '$tt' <== skipped" ;;
# Line 282  esac Line 314  esac
314    cd ../..    cd ../..
315    
316   else   else
317    echo "error: missing dir MITgcm_$tt/verification"    echo "error: missing dir $gcmDIR/verification"
318   fi   fi
319    
320  done  done

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

  ViewVC Help
Powered by ViewVC 1.1.22