/[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.6 by jmc, Wed Nov 7 23:10:02 2018 UTC
# Line 27  ulimit -s unlimited Line 27  ulimit -s unlimited
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"
# Line 97  if [ $checkOut -ge 2 ] ; then Line 97  if [ $checkOut -ge 2 ] ; then
97    
98    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
99    if [ $checkOut -eq 2 ] ; then    if [ $checkOut -eq 2 ] ; then
100      if test -e MITgcm/.git/config ; then      if test -e $git_code/.git/config ; then
101         echo MITgcm/.git/config 'exist'         echo $git_code/.git/config 'exist'
102      else      else
103         echo -n MITgcm/.git/config 'missing ; '         echo -n $git_code/.git/config 'missing ; '
104           checkOut=3
105           echo "will get new clone ( checkOut=$checkOut )"
106        fi
107        if test -e $git_other/.git/config ; then
108           echo $git_other/.git/config 'exist'
109        else
110           echo -n $git_other/.git/config 'missing ; '
111         checkOut=3         checkOut=3
112         echo "will get new clone ( checkOut=$checkOut )"         echo "will get new clone ( checkOut=$checkOut )"
113      fi      fi
114    fi    fi
115    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
116      test -e $git_code && rm -rf $git_code      test -e $git_code && rm -rf $git_code
117      echo -n "Make a clone of $git_code from repo: $git_repo ..."      echo "Make a clone of $git_code from repo: $git_repo ..."
118      git clone $git_repo/${git_code}.git 2> $tmpFil      git clone $git_repo/${git_code}.git 2> $tmpFil
119      retVal=$?      retVal=$?
120      if test $retVal = 0 ; then      if test $retVal = 0 ; then
# Line 119  if [ $checkOut -ge 2 ] ; then Line 126  if [ $checkOut -ge 2 ] ; then
126         rm -f $tmpFil         rm -f $tmpFil
127         exit 2         exit 2
128      fi      fi
129        test -e $git_other && rm -rf $git_other
130        echo "Make a clone of $git_other from repo: $git_repo ..."
131        git clone $git_repo/${git_other}.git 2> $tmpFil
132        retVal=$?
133        if test $retVal = 0 ; then
134           echo ' --> done!'
135           rm -f $tmpFil
136        else
137           echo " Error: 'git clone' returned: $retVal"
138           cat $tmpFil
139           rm -f $tmpFil
140           exit 2
141        fi
142    else    else
143      echo "Updating current clone ( $git_code ) ..."      echo "Updating current clone ( $git_code ) ..."
144      ( cd $git_code ; git pull )      ( cd $git_code ; git pull )
# Line 129  if [ $checkOut -ge 2 ] ; then Line 149  if [ $checkOut -ge 2 ] ; then
149         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
150         exit 3         exit 3
151      fi      fi
152        ( cd $git_code ; git checkout master -- . )
153        echo "Updating current clone ( $git_other ) ..."
154        ( cd $git_other ; git pull )
155        retVal=$?
156        if test $retVal = 0 ; then
157           echo ' --> done!'
158        else
159           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
160           exit 3
161        fi
162        ( cd $git_other ; git checkout master -- . )
163    fi    fi
   
164    #---- 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  
165    rsync -a $git_code/ MITgcm_today --exclude '.git'    rsync -a $git_code/ MITgcm_today --exclude '.git'
166      if test $sepDir = 0 ; then
167        echo -n " make a local copy of $git_other in MITgcm_today ..."      | tee -a $tdir/output_$tt
168        ( cd MITgcm_today
169          rsync -a ../$git_other/ $git_other --exclude '.git' )
170        echo " done"                                | tee -a $tdir/output_$tt
171      fi
172    #---- updating "other_input" dir    #---- updating "other_input" dir
173    if test -d other_input ; then    if test -d other_input ; then
174      list_dirs=`(cd other_input ; ls 2> /dev/null )`      list_dirs=`(cd other_input ; ls 2> /dev/null )`
# Line 261  do Line 294  do
294          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt
295          continue          continue
296        fi        fi
297        #-- download additional experience from Contrib:        if test "x$addExp" != x ; then
298            echo -n " make a local copy of $git_other ..."  | tee -a $tdir/output_$tt
299            rsync -a $tdir/$git_other/ $git_other --exclude '.git'
300            echo " done"                            | tee -a $tdir/output_$tt
301          fi
302          #-- add additional experience from $git_other
303        for exp2add in $addExp ; do        for exp2add in $addExp ; do
304          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
305          ( cd verification ;  $cmdCVS co -P -d $exp2add \          ( cd verification ;  ln -s ../$git_other/$exp2add . )
              MITgcm_contrib/verification_other/$exp2add > /dev/null )  
306          if test $exp2add = 'global_oce_cs32' ; then          if test $exp2add = 'global_oce_cs32' ; then
307            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
308            ( cd verification/${exp2add}            ( cd verification/${exp2add}
309              ln -s ../../../other_input/core2_cnyf . )              ln -s ../../../other_input/core2_cnyf . )
310          fi          fi
311          if test $exp2add = 'shelfice_remeshing' ; then         #if test $exp2add = 'shelfice_remeshing' ; then
312            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
313            ( cd verification/${exp2add}         #  ( cd verification/${exp2add}
314              ln -s ../../../other_input/remeshing_code extra_code )         #    ln -s ../../../other_input/remeshing_code extra_code )
315          fi         #fi
316        done        done
317      fi      fi
318    else    else

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

  ViewVC Help
Powered by ViewVC 1.1.22