/[MITgcm]/MITgcm_contrib/test_scripts/svante/test_submit_svante
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/svante/test_submit_svante

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

revision 1.18 by jmc, Wed Feb 7 21:13:57 2018 UTC revision 1.21 by jmc, Mon Feb 26 21:28:39 2018 UTC
# Line 66  if test -f /etc/profile.d/zz_modules.sh Line 66  if test -f /etc/profile.d/zz_modules.sh
66  module add slurm  module add slurm
67  module list                                             >> $LOG_FIL 2>&1  module list                                             >> $LOG_FIL 2>&1
68    
69  #- method to acces CVS:  #- method to access CVS:
70    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'    cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack -q'
71  #- and which GitHub repository to use:  #- which GitHub repository to use and how to access it:
72    git_repo='MITgcm';  git_code='MITgcm'    git_repo='MITgcm';  git_code='MITgcm'
73   #git_repo='altMITgcm'; #git_code='MITgcm66h'   #git_repo='altMITgcm'; #git_code='MITgcm66h'
74    #--
75      git_repo="https://github.com/$git_repo"
76     #git_repo="git://github.com/$git_repo"
77     #git_repo="git@github.com:$git_repo"
78    
79  checkOut=1  checkOut=1
80  addExp=''  addExp=''
81  updFile='updated_code'  updFile='updated_code'
82    
83  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
 #-- Download/Update reference version of MITgcm code:  
84  if [ $checkOut -ge 1 ] ; then  if [ $checkOut -ge 1 ] ; then
85    #-- Download/Update reference version of MITgcm code:
86    
87    if test $srcDIR = $TST_DIR ; then    if test $srcDIR = $TST_DIR ; then
88      echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL      echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL
# Line 104  if [ $checkOut -ge 1 ] ; then Line 108  if [ $checkOut -ge 1 ] ; then
108    
109    if [ $checkOut -eq 1 ] ; then    if [ $checkOut -eq 1 ] ; then
110      if test -e $git_code/.git/config ; then      if test -e $git_code/.git/config ; then
111          ( cd $git_code ; git checkout master )                    | tee -a $LOG_FIL
112        echo -n "Updating current clone ( $git_code ) ..."        | tee -a $LOG_FIL        echo -n "Updating current clone ( $git_code ) ..."        | tee -a $LOG_FIL
113        echo '' >> $LOG_FIL        echo '' >> $LOG_FIL
114        ( cd $git_code ; git pull )                               >> $LOG_FIL 2>&1        ( cd $git_code ; git pull )                               >> $LOG_FIL 2>&1
# Line 119  if [ $checkOut -ge 1 ] ; then Line 124  if [ $checkOut -ge 1 ] ; then
124      fi      fi
125    fi    fi
126    if [ $checkOut -eq 2 ] ; then    if [ $checkOut -eq 2 ] ; then
127        if test -e $git_code ; then
128           echo -n " removing dir: $git_code ..."           | tee -a $LOG_FIL
129           rm -rf $git_code
130           echo "  done"                                    | tee -a $LOG_FIL
131        fi
132      echo -n "Make a clone of $git_code from repo: $git_repo ..."        | tee -a $LOG_FIL      echo -n "Make a clone of $git_code from repo: $git_repo ..."        | tee -a $LOG_FIL
133      git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil      git clone $git_repo/${git_code}.git 2> $tmpFil
134      retVal=$?      retVal=$?
135      if test $retVal = 0 ; then      if test $retVal = 0 ; then
136         echo ' --> done!'                                | tee -a $LOG_FIL         echo ' --> done!'                                | tee -a $LOG_FIL
# Line 132  if [ $checkOut -ge 1 ] ; then Line 142  if [ $checkOut -ge 1 ] ; then
142      fi      fi
143    fi    fi
144    #---- making a new working copy: MITgcm_today    #---- making a new working copy: MITgcm_today
   ( cd $git_code ; git checkout master )  
145    rsync -a $git_code/ $srcCode --exclude '.git'    rsync -a $git_code/ $srcCode --exclude '.git'
146      ls -ld $srcCode                                       | tee -a $LOG_FIL
147    if test -d $srcCode/verification ; then    if test -d $srcCode/verification ; then
148      for exp2add in $addExp ; do      for exp2add in $addExp ; do
149        echo " add dir: $exp2add (from Contrib:verification_other)" | tee -a $LOG_FIL        echo " add dir: $exp2add (from Contrib:verification_other)" | tee -a $LOG_FIL
# Line 147  if [ $checkOut -ge 1 ] ; then Line 157  if [ $checkOut -ge 1 ] ; then
157    if test -d $srcCode/verification ; then    if test -d $srcCode/verification ; then
158      echo $today > $updFile ; sleep 2      echo $today > $updFile ; sleep 2
159      ls -l $updFile                                      | tee -a $LOG_FIL      ls -l $updFile                                      | tee -a $LOG_FIL
160        echo ''                                             | tee -a $LOG_FIL
161    fi    fi
162    
 #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  
163  #-- Done with Download/Update of MITgcm code  #-- Done with Download/Update of MITgcm code
164  fi  fi
165    #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
166    
167  #-- leave srcDIR and go back to output dir  #-- leave srcDIR and go back to output dir
168  cd $OUT_DIR  cd $OUT_DIR

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.21

  ViewVC Help
Powered by ViewVC 1.1.22