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

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.12

  ViewVC Help
Powered by ViewVC 1.1.22