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

Diff of /MITgcm_contrib/test_scripts/ref_machine/test_baudelaire

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

revision 1.6 by jmc, Wed Jun 13 17:47:51 2018 UTC revision 1.9 by jmc, Thu Jun 20 15:53:49 2019 UTC
# Line 29  ulimit -s unlimited Line 29  ulimit -s unlimited
29  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'
30    
31  #- which GitHub repository to use and how to access it:  #- which GitHub repository to use and how to access it:
32    git_repo='MITgcm';  git_code='MITgcm'    git_repo='MITgcm';  git_code='MITgcm' ; git_other='verification_other'
33   #git_repo='altMITgcm'; #git_code='MITgcm66h'   #git_repo='altMITgcm'; #git_code='MITgcm66h'
34  #--  #--
35   #git_repo="https://github.com/$git_repo"   #git_repo="https://github.com/$git_repo"
# Line 98  if [ $checkOut -ge 2 ] ; then Line 98  if [ $checkOut -ge 2 ] ; then
98    
99    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
100    if [ $checkOut -eq 2 ] ; then    if [ $checkOut -eq 2 ] ; then
101      if test -e MITgcm/.git/config ; then      if test -e $git_code/.git/config ; then
102         echo MITgcm/.git/config 'exist'         echo $git_code/.git/config 'exist'
103      else      else
104         echo -n MITgcm/.git/config 'missing ; '         echo -n $git_code/.git/config 'missing ; '
105           checkOut=3
106           echo "will get new clone ( checkOut=$checkOut )"
107        fi
108        if test -e $git_other/.git/config ; then
109           echo $git_other/.git/config 'exist'
110        else
111           echo -n $git_other/.git/config 'missing ; '
112         checkOut=3         checkOut=3
113         echo "will get new clone ( checkOut=$checkOut )"         echo "will get new clone ( checkOut=$checkOut )"
114      fi      fi
115    fi    fi
116    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
117      test -e $git_code && rm -rf $git_code      test -e $git_code && rm -rf $git_code
118      echo -n "Make a clone of $git_code from repo: $git_repo ..."      echo "Make a clone of $git_code from repo: $git_repo ..."
119      git clone $git_repo/${git_code}.git 2> $tmpFil      git clone $git_repo/${git_code}.git 2> $tmpFil
120      retVal=$?      retVal=$?
121      if test $retVal = 0 ; then      if test $retVal = 0 ; then
# Line 120  if [ $checkOut -ge 2 ] ; then Line 127  if [ $checkOut -ge 2 ] ; then
127         rm -f $tmpFil         rm -f $tmpFil
128         exit 2         exit 2
129      fi      fi
130        test -e $git_other && rm -rf $git_other
131        echo "Make a clone of $git_other from repo: $git_repo ..."
132        git clone $git_repo/${git_other}.git 2> $tmpFil
133        retVal=$?
134        if test $retVal = 0 ; then
135           echo ' --> done!'
136           rm -f $tmpFil
137        else
138           echo " Error: 'git clone' returned: $retVal"
139           cat $tmpFil
140           rm -f $tmpFil
141           exit 2
142        fi
143    else    else
144      echo "Updating current clone ( $git_code ) ..."      echo "Updating current clone ( $git_code ) ..."
145      ( cd $git_code ; git pull )      ( cd $git_code ; git pull )
# Line 130  if [ $checkOut -ge 2 ] ; then Line 150  if [ $checkOut -ge 2 ] ; then
150         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"         echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
151         exit 3         exit 3
152      fi      fi
153        ( cd $git_code ; git checkout master -- . )
154        echo "Updating current clone ( $git_other ) ..."
155        ( cd $git_other ; git pull )
156        retVal=$?
157        if test $retVal = 0 ; then
158           echo ' --> done!'
159        else
160           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
161           exit 3
162        fi
163        ( cd $git_other ; git checkout master -- . )
164    fi    fi
   
165    #---- 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  
166    rsync -a $git_code/ MITgcm_today --exclude '.git'    rsync -a $git_code/ MITgcm_today --exclude '.git'
167      if test $sepDir = 0 ; then
168        echo -n " make a local copy of $git_other in MITgcm_today ..."      | tee -a $tdir/output_$tt
169        ( cd MITgcm_today
170          rsync -a ../$git_other/ $git_other --exclude '.git' )
171        echo " done"                                | tee -a $tdir/output_$tt
172      fi
173    #---- updating "other_input" dir    #---- updating "other_input" dir
174    if test -d other_input ; then    if test -d other_input ; then
175      list_dirs=`(cd other_input ; ls 2> /dev/null )`      list_dirs=`(cd other_input ; ls 2> /dev/null )`
# Line 166  do Line 199  do
199    #- define list of additional experiences to test:    #- define list of additional experiences to test:
200    addExp=''    addExp=''
201    if test $typ = 'mp2' -o $typ = 'ifc' ; then    if test $typ = 'mp2' -o $typ = 'ifc' ; then
202      addExp="offline_cheapaml atm_gray"      addExp="offline_cheapaml atm_gray atm_strato"
203    fi    fi
204    if test $typ = 'gfo' -o $typ = 'ifc' ; then    if test $typ = 'gfo' -o $typ = 'ifc' ; then
205      addExp="$addExp global_oce_biogeo_bling"      addExp="$addExp global_oce_biogeo_bling"
# Line 262  do Line 295  do
295          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt          echo " missing dir verification --> end test $tt"       | tee -a $tdir/output_$tt
296          continue          continue
297        fi        fi
298        #-- download additional experience from Contrib:        if test "x$addExp" != x ; then
299            echo -n " make a local copy of $git_other ..."  | tee -a $tdir/output_$tt
300            rsync -a $tdir/$git_other/ $git_other --exclude '.git'
301            echo " done"                            | tee -a $tdir/output_$tt
302          fi
303          #-- add additional experience from $git_other
304        for exp2add in $addExp ; do        for exp2add in $addExp ; do
305          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
306          ( cd verification ;  $cmdCVS co -P -d $exp2add \          ( cd verification ;  ln -s ../$git_other/$exp2add . )
              MITgcm_contrib/verification_other/$exp2add > /dev/null )  
307          if test $exp2add = 'global_oce_cs32' ; then          if test $exp2add = 'global_oce_cs32' ; then
308            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
309            ( cd verification/${exp2add}            ( cd verification/${exp2add}
310              ln -s ../../../other_input/core2_cnyf . )              ln -s ../../../other_input/core2_cnyf . )
311          fi          fi

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

  ViewVC Help
Powered by ViewVC 1.1.22