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

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

  ViewVC Help
Powered by ViewVC 1.1.22