/[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.3 by jmc, Fri May 27 19:45:48 2016 UTC revision 1.11 by jmc, Mon Nov 1 13:45:29 2021 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'      tst_list='gadm gads gad4 gmp4 gmp2 gfo gfo4 g77 g7a'
17    elif test $1 = gfor8 ; then    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'
# Line 36  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    sendCmd='-a jm_c@mitgcm.org'
46    sendCmd='-send scp -a jm_c@mitgcm.org:testing/MITgcm-test'
47    
48  #-- for now, cannot mix ifort/gfortran tests:  #-- for now, cannot mix ifort/gfortran tests:
49  gfort=1  gfort=1
# Line 63  fi Line 70  fi
70  for tt in $tst_list  for tt in $tst_list
71  do  do
72    
73      gcmDIR="MITgcm_$tt"
74    echo "=========================================================================="    echo "=========================================================================="
75  # set -x  # set -x
76    rm -f tr_clean_$tt.log    rm -f tr_clean_$tt.log
77    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?    echo $tt | grep '^.ad' > /dev/null 2>&1 ; fwd=$?
78      if test $tt = g7a ; then fwd=0 ; fi
79    echo " testing tt= $tt , fwd= $fwd"    echo " testing tt= $tt , fwd= $fwd"
80   if test -d MITgcm_$tt/verification ; then   if test -e $gcmDIR/.git/config -a -d $gcmDIR/verification ; then
81   #- cleaning previous testreport run and updating the code:   #- cleaning previous testreport run and updating the code:
82    if [ $fwd -eq 0 ] ; then    if [ $fwd -eq 0 ] ; then
83     set -x     set -x
84    #- cleanup previous test:    #- cleanup previous test:
85     ( 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 )
86     set +x     set +x
87    else    else
88     set -x     set -x
89    #- cleanup previous restart:    #- cleanup previous restart:
90     ( 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 )
91    #- cleanup previous test:    #- cleanup previous test:
92     ( cd MITgcm_$tt/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 )     ( cd $gcmDIR/verification ; ./testreport -clean >> ../../tr_clean_$tt.log 2>&1 )
93     set +x     set +x
94    fi    fi
95    if [ $gfort -eq 0 ] ; then    if [ $gfort -eq 0 ] ; then
96      echo ' remove all Makefile_syntax and do "cvs update -P -d"' >> tr_clean_$tt.log      echo ' remove all Makefile_syntax' >> tr_clean_$tt.log
97      ( 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  
98    fi    fi
99    echo ""    echo "" >> tr_clean_$tt.log
100    
101    echo "=========================================================================="    echo "==========================================================================" \
102           >> tr_clean_$tt.log
103      echo " Update MITgcm code in dir: $gcmDIR using 'git pull':" | tee -a tr_clean_$tt.log
104    set -x    set -x
105    #- update the code:    #- update the code:
106    ( cd MITgcm_$tt ; $cmdCVS update -P -d  >> ../tr_clean_$tt.log 2>&1 )    ( cd $gcmDIR ; git pull )                             >> tr_clean_$tt.log 2>&1 ; retv=$?
107      set +x
108      if test $retv != 0 ; then
109        echo "'git pull' in $gcmDIR fail (return val=$retv) => skip" | tee -a tr_clean_$tt.log
110        continue
111      fi
112      echo "  and checkout master:"                         | tee -a tr_clean_$tt.log
113      set -x
114      ( cd $gcmDIR ; git checkout master -- . )             >> tr_clean_$tt.log 2>&1
115    set +x    set +x
116   else   else
117      echo "Missing '$gcmDIR/.git/config' or dir '$gcmDIR/verification'" >> tr_clean_$tt.log
118      if test -e $gcmDIR ; then
119        echo -n " removing working copy: $gcmDIR ..."       >> tr_clean_$tt.log
120        rm -rf $gcmDIR
121        echo "  done"                                       >> tr_clean_$tt.log
122      fi
123   #- download new code:   #- download new code:
124    echo " run '$cmdCVS co -P -d  MITgcm_$tt MITgcm'"  >> tr_clean_$tt.log    echo "==========================================================================" \
125    echo "=========================================================================="         >> tr_clean_$tt.log
126      echo "Make a clone of $git_code from repo: $git_repo into: $gcmDIR ..." | tee -a  tr_clean_$tt.log
127    set -x    set -x
128      $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
129      retv=$?
130    set +x    set +x
131      if test $retv = 0 ; then
132        echo '  done' >> tr_clean_$tt.log ; rm -f $tmpFil
133      else
134        echo "'git clone' into $gcmDIR failed (return: $retv) => skip" | tee -a tr_clean_$tt.log
135        cat $tmpFil >> tr_clean_$tt.log ; rm -f $tmpFil
136        continue
137      fi
138   fi   fi
139    echo ""    echo ""
140    echo "=========================================================================="    echo "=========================================================================="
141    
142   if test -d MITgcm_$tt/verification ; then   if test -d $gcmDIR/verification ; then
143    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
144    cd MITgcm_$tt/verification    cd $gcmDIR/verification
145    
146    date    date
147    # verbose mode:    # verbose mode:
# Line 125  case $tt in Line 157  case $tt in
157    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
158    
159    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_ifort11 \
160     -devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q $sendCmd >> ../../tr_run_$tt.log 2>&1
161    
162    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
163  ;;  ;;
# Line 137  case $tt in Line 169  case $tt in
169    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
170    
171    ./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -ur4 -adm -of ../tools/build_options/linux_amd64_ifort11 \
172     -devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -match 5 $sendCmd >> ../../tr_run_$tt.log 2>&1
173    
174    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
175  ;;  ;;
# Line 152  case $tt in Line 184  case $tt in
184    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
185    
186    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_ifort11 \
187     -devel -q -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q $sendCmd >> ../../tr_run_$tt.log 2>&1
188    
189    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
190    
191    #- test restart:    #- test restart:
192    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
193    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi $sendCmd >> ../../tr_run_$tt.log 2>&1
194      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
195  ;;  ;;
196    
197  'iur4')  'iur4')
# Line 168  case $tt in Line 201  case $tt in
201    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
202    
203    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_ifort11 \
204     -devel -q -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -q -match 5 $sendCmd >> ../../tr_run_$tt.log 2>&1
205    
206    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
207    
208    #- test restart:    #- test restart:
209    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
210    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi $sendCmd >> ../../tr_run_$tt.log 2>&1
211      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
212  ;;  ;;
213    
214  'gadm')  'gadm')
215    
216    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -adm -of ../tools/build_options/linux_amd64_gfortran \
217     -devel -ncad -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
218    
219    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
220  ;;  ;;
# Line 188  case $tt in Line 222  case $tt in
222  'gads')  'gads')
223    
224    ./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -adm -of ../tools/build_options/linux_amd64_gfortran \
225     -devel -ncad -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
226    
227    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
228  ;;  ;;
# Line 196  case $tt in Line 230  case $tt in
230  'gad4')  'gad4')
231    
232    ./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -adm -ur4 -of ../tools/build_options/linux_amd64_gfortran \
233     -devel -ncad -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -ncad -nc -match 5 $sendCmd >> ../../tr_run_$tt.log 2>&1
234    
235      sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
236    ;;
237    
238    'g7a')
239    
240      ./testreport -adm -of ../tools/build_options/linux_amd64_g77 \
241       -skd 'halfpipe_streamice' \
242       -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
243    
244    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
245  ;;  ;;
# Line 207  case $tt in Line 250  case $tt in
250    export GOMP_STACKSIZE=400m    export GOMP_STACKSIZE=400m
251    
252    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 2 -mth -of ../tools/build_options/linux_amd64_gfortran \
253     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
254    
255    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
256    
257    #- test restart:    #- test restart:
258    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
259    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi $sendCmd >> ../../tr_run_$tt.log 2>&1
260      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
261  ;;  ;;
262    
263  'gmpi')  'gmpi')
264    
265    ./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -of ../tools/build_options/linux_amd64_gfortran \
266     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
267    
268    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
269    
270    #- test restart:    #- test restart:
271    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
272    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi $sendCmd >> ../../tr_run_$tt.log 2>&1
273      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
274  ;;  ;;
275    
276  'gmp4')  'gmp4')
277    
278    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -MPI 3 -ur4 -of ../tools/build_options/linux_amd64_gfortran \
279     -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -match 5 $sendCmd >> ../../tr_run_$tt.log 2>&1
280    
281    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
282    
283    #- test restart:    #- test restart:
284    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
285    ../tools/do_tst_2+2 -mpi -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 -mpi $sendCmd >> ../../tr_run_$tt.log 2>&1
286      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
287  ;;  ;;
288    
289  'gfo')  'gfo')
290    
291    ./testreport -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -of ../tools/build_options/linux_amd64_gfortran \
292     -devel -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
293    
294    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
295    
296    #- test restart:    #- test restart:
297    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
298    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 $sendCmd >> ../../tr_run_$tt.log 2>&1
299      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
300  ;;  ;;
301    
302  'gfo4')  'gfo4')
303    
304    ./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \    ./testreport -ur4 -of ../tools/build_options/linux_amd64_gfortran \
305     -devel -nc -match 5 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -devel -nc -match 5 $sendCmd >> ../../tr_run_$tt.log 2>&1
306    
307    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
308    
309    #- test restart:    #- test restart:
310    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
311    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 $sendCmd >> ../../tr_run_$tt.log 2>&1
312      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
313  ;;  ;;
314    
315  'g77')  'g77')
316    
317    ./testreport -of ../tools/build_options/linux_amd64_g77 \    ./testreport -of ../tools/build_options/linux_amd64_g77 \
318     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20' \     -skd 'fizhi-cs-32x32x40 fizhi-cs-aqualev20 halfpipe_streamice internal_wave tutorial_advection_in_gyre' \
319     -nc -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1     -nc $sendCmd >> ../../tr_run_$tt.log 2>&1
320    
321    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log    sed -n "/ email /,/^======== End of testreport / p" ../../tr_run_$tt.log
322    
323    #- test restart:    #- test restart:
324    echo '' >> ../../tr_run_$tt.log 2>&1    echo '' >> ../../tr_run_$tt.log 2>&1
325    ../tools/do_tst_2+2 -a jmc@mitgcm.org >> ../../tr_run_$tt.log 2>&1    ../tools/do_tst_2+2 $sendCmd >> ../../tr_run_$tt.log 2>&1
326      sed -n '/^=====  Summary /,$ p' ../../tr_run_$tt.log
327  ;;  ;;
328    
329  *) echo "unrecognized test suffix '$tt' <== skipped" ;;  *) echo "unrecognized test suffix '$tt' <== skipped" ;;
# Line 284  esac Line 333  esac
333    cd ../..    cd ../..
334    
335   else   else
336    echo "error: missing dir MITgcm_$tt/verification"    echo "error: missing dir $gcmDIR/verification"
337   fi   fi
338    
339  done  done

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

  ViewVC Help
Powered by ViewVC 1.1.22