/[MITgcm]/MITgcm_contrib/test_scripts/ref_machine/test_villon
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/ref_machine/test_villon

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

revision 1.3 by jmc, Mon Feb 26 21:11:03 2018 UTC revision 1.8 by jmc, Tue Sep 17 22:43:23 2019 UTC
# Line 21  ulimit -s unlimited Line 21  ulimit -s unlimited
21    source $HOME/bin/openmpi.sh    source $HOME/bin/openmpi.sh
22    
23  #- method to access CVS:  #- method to access CVS:
24  # cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'
25  # cmdCVS='cvs -d /u/gcmpack'  # cmdCVS='cvs -d /u/gcmpack'
26    export CVS_RSH=ssh  # export CVS_RSH=ssh
27    cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'
28    
29  #- which GitHub repository to use and how to access it:  #- which GitHub repository to use and how to access it:
30    git_repo='MITgcm';  git_code='MITgcm'    git_repo='MITgcm';  git_code='MITgcm' ; git_other='verification_other'
31   #git_repo='altMITgcm'; #git_code='MITgcm66h'   #git_repo='altMITgcm'; #git_code='MITgcm66h'
32  #--  #--
33    git_repo="https://github.com/$git_repo"    git_repo="https://github.com/$git_repo"
34   #git_repo="git://github.com/$git_repo"   #git_repo="git://github.com/$git_repo"
35   #git_repo="git@github.com:$git_repo"   #git_repo="git@github.com:$git_repo"
36    
37    #-------------------------------------------------------------------
38  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)
39  #   =2 : update (git pull) repo  and make a new copy code  (switch to 2 if no repo)  #   =2 : update (git pull) repo  and make a new copy code  (switch to 3 if no repo)
40  #   =1 : skip update             but use a new copy  (if sepDir)  #   =1 : skip update             but use a new copy  (if sepDir)
41  #   =0 : use existing test code ( switch to 1 if missing test code )  #   =0 : use existing test code ( switch to 1 if missing test code )
42  dInWeek=`date +%a`  dInWeek=`date +%a`
# Line 53  option= Line 53  option=
53    
54  if test $tst_grp = 'a' ; then  if test $tst_grp = 'a' ; then
55   checkOut=2   checkOut=2
56  #tst_list='g7a mpa mth mp2+rs mpi oad'   tst_list='mpa mpi mp2+rs mth'
  tst_list='mpa adm mpi gfo+rs mth+rs'  
  tst_list="$tst_list oad"  
57  else  else
58   checkOut=1   checkOut=1
59   tst_list='adm g77 gfo+rs ifc'   tst_list='adm gfo+rs'
60    #tst_list="$tst_list oad"
61   if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi   if test "x$dInWeek" = xSun ; then tst_list="$tst_list tlm" ; fi
62  fi  fi
63  echo " test: $outDir ; list='$tst_list'"  echo " test: $outDir ; list='$tst_list'"
# Line 97  if [ $checkOut -ge 2 ] ; then Line 96  if [ $checkOut -ge 2 ] ; then
96    
97    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
98    if [ $checkOut -eq 2 ] ; then    if [ $checkOut -eq 2 ] ; then
99      if test -e MITgcm/.git/config ; then      if test -e $git_code/.git/config ; then
100         echo MITgcm/.git/config 'exist'         echo $git_code/.git/config 'exist'
101        else
102           echo -n $git_code/.git/config 'missing ; '
103           checkOut=3
104           echo "will get new clone ( checkOut=$checkOut )"
105        fi
106        if test -e $git_other/.git/config ; then
107           echo $git_other/.git/config 'exist'
108      else      else
109         echo -n MITgcm/.git/config 'missing ; '         echo -n $git_other/.git/config 'missing ; '
110         checkOut=3         checkOut=3
111         echo "will get new clone ( checkOut=$checkOut )"         echo "will get new clone ( checkOut=$checkOut )"
112      fi      fi
113    fi    fi
114    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
115      test -e $git_code && rm -rf $git_code      test -e $git_code && rm -rf $git_code
116      echo -n "Make a clone of $git_code from repo: $git_repo ..."      echo "Make a clone of $git_code from repo: $git_repo ..."
117      git clone $git_repo/${git_code}.git 2> $tmpFil      git clone $git_repo/${git_code}.git 2> $tmpFil
118      retVal=$?      retVal=$?
119      if test $retVal = 0 ; then      if test $retVal = 0 ; then
# Line 119  if [ $checkOut -ge 2 ] ; then Line 125  if [ $checkOut -ge 2 ] ; then
125         rm -f $tmpFil         rm -f $tmpFil
126         exit 2         exit 2
127      fi      fi
128        test -e $git_other && rm -rf $git_other
129        echo "Make a clone of $git_other from repo: $git_repo ..."
130        git clone $git_repo/${git_other}.git 2> $tmpFil
131        retVal=$?
132        if test $retVal = 0 ; then
133           echo ' --> done!'
134           rm -f $tmpFil
135        else
136           echo " Error: 'git clone' returned: $retVal"
137           cat $tmpFil
138           rm -f $tmpFil
139           exit 2
140        fi
141    else    else
142      echo "Updating current clone ( $git_code ) ..."      echo "Updating current clone ( $git_code ) ..."
143      ( cd $git_code ; git pull )      ( cd $git_code ; git pull )
# Line 129  if [ $checkOut -ge 2 ] ; then Line 148  if [ $checkOut -ge 2 ] ; then
148         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
149         exit 3         exit 3
150      fi      fi
151        ( cd $git_code ; git checkout master -- . )
152        echo "Updating current clone ( $git_other ) ..."
153        ( cd $git_other ; git pull )
154        retVal=$?
155        if test $retVal = 0 ; then
156           echo ' --> done!'
157        else
158           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
159           exit 3
160        fi
161        ( cd $git_other ; git checkout master -- . )
162    fi    fi
   
163    #---- making a new working copy: MITgcm_today    #---- making a new working copy: MITgcm_today
   ( cd $git_code ; git checkout master )  
    # mkdir MITgcm_today  
    # cp -p -ra $git_code/* MITgcm_today  
164    rsync -a $git_code/ MITgcm_today --exclude '.git'    rsync -a $git_code/ MITgcm_today --exclude '.git'
165      if test $sepDir = 0 ; then
166        echo -n " make a local copy of $git_other in MITgcm_today ..."      | tee -a $tdir/output_$tt
167        ( cd MITgcm_today
168          rsync -a ../$git_other/ $git_other --exclude '.git' )
169        echo " done"                                | tee -a $tdir/output_$tt
170      fi
171    #---- updating "other_input" dir    #---- updating "other_input" dir
172    if test -d other_input ; then    if test -d other_input ; then
173      list_dirs=`(cd other_input ; ls 2> /dev/null )`      list_dirs=`(cd other_input ; ls 2> /dev/null )`
# Line 165  do Line 197  do
197    #- define list of additional experiences to test:    #- define list of additional experiences to test:
198    addExp=''    addExp=''
199    if test $typ = 'mpi' ; then    if test $typ = 'mpi' ; then
200      addExp="offline_cheapaml atm_gray"      addExp="offline_cheapaml atm_gray atm_strato"
201    fi    fi
202    if test $typ = 'gfo' -o $typ = 'ifc' ; then    if test $typ = 'gfo' -o $typ = 'ifc' -o $typ = 'adm' ; then
203      addExp="$addExp global_oce_biogeo_bling"      addExp="$addExp global_oce_biogeo_bling"
204      fi
205      if test $typ = 'gfo' -o $typ = 'ifc' ; then
206      addExp="$addExp shelfice_remeshing"      addExp="$addExp shelfice_remeshing"
207    fi    fi
208    if test $typ = 'mpi' ; then    if test $typ = 'mpi' ; then
209      addExp="$addExp global_ocean.gm_k3d"      addExp="$addExp global_ocean.gm_k3d"
210      addExp="$addExp global_oce_cs32"      addExp="$addExp global_oce_cs32"
211        addExp="$addExp global_oce_llc90"
212    fi    fi
213    #- check day and time:    #- check day and time:
214    curDay=`date +%d` ; curHour=`date +%H`    curDay=`date +%d` ; curHour=`date +%H`
# Line 202  do Line 237  do
237    if test $sepDir = 1 ; then    if test $sepDir = 1 ; then
238      new_dir="MITgcm_$typ"      new_dir="MITgcm_$typ"
239      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi      reUse=0 ; if [ $checkOut -le 0 ] ; then reUse=1 ; fi
240      if test -d $new_dir/CVS -a $reUse = 1 ; then      if test -d $new_dir/doc -a $reUse = 1 ; then
241        cd $tdir/$new_dir        cd $tdir/$new_dir
242        if test $tt != $typ ; then        if test $tt != $typ ; then
243          ( cd verification ; ../tools/do_tst_2+2 -clean )          ( cd verification ; ../tools/do_tst_2+2 -clean )
# Line 261  do Line 296  do
296          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt
297          continue          continue
298        fi        fi
299        #-- download additional experience from Contrib:        if test "x$addExp" != x ; then
300            echo -n " make a local copy of $git_other ..."  | tee -a $tdir/output_$tt
301            rsync -a $tdir/$git_other/ $git_other --exclude '.git'
302            echo " done"                            | tee -a $tdir/output_$tt
303          fi
304          #-- add additional experience from $git_other
305        for exp2add in $addExp ; do        for exp2add in $addExp ; do
306          echo " add dir: $exp2add (from Contrib:verification_other)"     | tee -a $tdir/output_$tt          echo "  add link: $exp2add (from $git_other )"  | tee -a $tdir/output_$tt
307          ( cd verification ;  $cmdCVS co -P -d $exp2add \          ( cd verification ;  ln -s ../$git_other/$exp2add . )
              MITgcm_contrib/verification_other/$exp2add > /dev/null )  
308          if test $exp2add = 'global_oce_cs32' ; then          if test $exp2add = 'global_oce_cs32' ; then
309            echo " link dir 'other_input/core2_cnyf' in here"             | tee -a $tdir/output_$tt            echo "      link dir 'other_input/core2_cnyf' in here"        | tee -a $tdir/output_$tt
310            ( cd verification/${exp2add}            ( cd verification/${exp2add}
311              ln -s ../../../other_input/core2_cnyf . )              ln -s ../../../other_input/core2_cnyf . )
312          fi          fi
313          if test $exp2add = 'shelfice_remeshing' ; then         #if test $exp2add = 'shelfice_remeshing' ; then
314            echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt         #  echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt
315            ( cd verification/${exp2add}         #  ( cd verification/${exp2add}
316              ln -s ../../../other_input/remeshing_code extra_code )         #    ln -s ../../../other_input/remeshing_code extra_code )
317          fi         #fi
318        done        done
319      fi      fi
320    else    else

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

  ViewVC Help
Powered by ViewVC 1.1.22