/[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.2 by jmc, Sat Feb 24 17:34:43 2018 UTC revision 1.6 by jmc, Wed Nov 7 23:10:02 2018 UTC
# Line 20  ulimit -s unlimited Line 20  ulimit -s unlimited
20  #  MPI test (for now, only with gfortran)  #  MPI test (for now, only with gfortran)
21    source $HOME/bin/openmpi.sh    source $HOME/bin/openmpi.sh
22    
23  #- method to acces 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  #- and which GitHub repository to use:  #- 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"
34     #git_repo="git://github.com/$git_repo"
35     #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 2 if no repo)
# Line 92  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 https://github.com/$git_repo/${git_code}.git 2> $tmpFil      git clone $git_repo/${git_code}.git 2> $tmpFil
119        retVal=$?
120        if test $retVal = 0 ; then
121           echo ' --> done!'
122           rm -f $tmpFil
123        else
124           echo " Error: 'git clone' returned: $retVal"
125           cat $tmpFil
126           rm -f $tmpFil
127           exit 2
128        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=$?      retVal=$?
133      if test $retVal = 0 ; then      if test $retVal = 0 ; then
134         echo ' --> done!'         echo ' --> done!'
# Line 124  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 256  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.2  
changed lines
  Added in v.1.6

  ViewVC Help
Powered by ViewVC 1.1.22