/[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.1 by jmc, Wed Jan 31 23:33:23 2018 UTC revision 1.7 by jmc, Thu Oct 11 19:12:07 2018 UTC
# Line 22  ulimit -s unlimited Line 22  ulimit -s unlimited
22    export MPI_INC_DIR=$MPI_GCC_DIR/include    export MPI_INC_DIR=$MPI_GCC_DIR/include
23    export PATH="$PATH:$MPI_GCC_DIR/bin"    export PATH="$PATH:$MPI_GCC_DIR/bin"
24    
25  #- method to acces CVS:  #- method to access CVS:
26    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack'
27    cmdCVS='cvs -d /u/gcmpack'    cmdCVS='cvs -d /u/gcmpack'
28  # export CVS_RSH=ssh  # export CVS_RSH=ssh
29  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'  # cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack'
30    
31  #- and which GitHub repository to use:  #- 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"
36      git_repo="git://github.com/$git_repo"
37     #git_repo="git@github.com:$git_repo"
38    
39  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)  # checkOut=3 : clone from GitHub and make a new copy (if sepDir)
40  #   =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 93  if [ $checkOut -ge 2 ] ; then Line 97  if [ $checkOut -ge 2 ] ; then
97    cd $tdir    cd $tdir
98    
99    #---- Making a new clone or updating existing one:    #---- Making a new clone or updating existing one:
100    if test -e MITgcm/.git/config ; then    if [ $checkOut -eq 2 ] ; then
101      echo MITgcm/.git/config 'exist'      if test -e $git_code/.git/config ; then
102    else         echo $git_code/.git/config 'exist'
103      echo -n MITgcm/.git/config 'missing ; '      else
104      checkOut=3         echo -n $git_code/.git/config 'missing ; '
105      echo "will get new clone ( checkOut=$checkOut )"         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
113           echo "will get new clone ( checkOut=$checkOut )"
114        fi
115    fi    fi
116    if [ $checkOut -eq 3 ] ; then    if [ $checkOut -eq 3 ] ; then
117      echo -n "Make a clone of $git_code from repo: $git_repo ..."      test -e $git_code && rm -rf $git_code
118      git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil      echo "Make a clone of $git_code from repo: $git_repo ..."
119        git clone $git_repo/${git_code}.git 2> $tmpFil
120        retVal=$?
121        if test $retVal = 0 ; then
122           echo ' --> done!'
123           rm -f $tmpFil
124        else
125           echo " Error: 'git clone' returned: $retVal"
126           cat $tmpFil
127           rm -f $tmpFil
128           exit 2
129        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=$?      retVal=$?
134      if test $retVal = 0 ; then      if test $retVal = 0 ; then
135         echo ' --> done!'         echo ' --> done!'
# Line 116  if [ $checkOut -ge 2 ] ; then Line 143  if [ $checkOut -ge 2 ] ; then
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 )
146      echo ' --> done!'      retVal=$?
147        if test $retVal = 0 ; then
148           echo ' --> done!'
149        else
150           echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit"
151           exit 3
152        fi
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
165    ( cd $git_code ; git checkout master )    ( 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 249  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
312          if test $exp2add = 'shelfice_remeshing' ; then         #if test $exp2add = 'shelfice_remeshing' ; then
313            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
314            ( cd verification/${exp2add}         #  ( cd verification/${exp2add}
315              ln -s ../../../other_input/remeshing_code extra_code )         #    ln -s ../../../other_input/remeshing_code extra_code )
316          fi         #fi
317        done        done
318      fi      fi
319    else    else
# Line 312  do Line 362  do
362    
363  #-- set specific Env Vars:  #-- set specific Env Vars:
364    if test $typ = 'oad' ; then    if test $typ = 'oad' ; then
365      source $HOME/mitgcm/bin/setenv_OpenAD.sh    | tee -a $tdir/output_$tt      #- for some reasons, "source ScriptFile | tee -a LogFile"
366        #  does run the script but does not keep the env-var settings
367        source $HOME/mitgcm/bin/setenv_OpenAD.sh    >> $tdir/output_$tt
368    fi    fi
369    if test $typ = 'ifc' ; then    if test $typ = 'ifc' ; then
370      source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64      source /srv/software/intel/intel-11.1.073/bin/ifortvars.sh intel64

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.22