/[MITgcm]/MITgcm_contrib/test_scripts/sxace/mitgcmtestreport
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/sxace/mitgcmtestreport

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

revision 1.2 by mlosch, Tue Sep 1 08:03:35 2015 UTC revision 1.4 by mlosch, Thu Feb 8 15:50:19 2018 UTC
# Line 52  selectexperiment='-t exp2' Line 52  selectexperiment='-t exp2'
52  selectexperiment=''  selectexperiment=''
53  # download code into this directory  # download code into this directory
54  TDIR=/ace/user/mlosch/tmp_$VENDOR  TDIR=/ace/user/mlosch/tmp_$VENDOR
55    gcmDIR=MITgcm
56    git_repo='MITgcm'
57    git_code='MITgcm'
58    
59  OPTFILE=../tools/build_options/SUPER-UX_SX-ACE_sxf90_awi  OPTFILE=../tools/build_options/SUPER-UX_SX-ACE_sxf90_awi
60  #OPTFILE=/home/ace/mlosch/MITgcm/tools/build_options/SUPER-UX_SX-ACE_sxf90_awi  #OPTFILE=/home/ace/mlosch/MITgcm/tools/build_options/SUPER-UX_SX-ACE_sxf90_awi
# Line 84  fi Line 87  fi
87  if [ -e $OUTFILE ]; then  if [ -e $OUTFILE ]; then
88    rm -r $OUTFILE    rm -r $OUTFILE
89  fi  fi
90  if [ -e $TDIR/MITgcm ]; then  
91  # if availabe just update  # checkOut determines how much checking out is being done
92      cd $TDIR/MITgcm  # checkOut = 3: new clone from GitHub and make a new copy
93      cvs -q update -d -P >> cvs_co.log 2>&1  # checkOut = 2: update (git pull) existing repo and make a new copy
94      if [ "$?" != "0" ]; then  # checkOut = 1: skip update
95          cat cvs_co.log  # checkOut = 0: use existing test code (if available otherwise switch to 1)
96    
97    checkOut=2
98    
99    tmpFil=$TDIR/error.out
100    if [ $checkOut -le 1 ] ; then
101      if test -e $TDIR/${gcmDIR}/doc ; then
102        echo $TDIR/${gcmDIR}/doc 'exist'
103      else
104        echo -n $TDIR/${gcmDIR} 'missing ; '
105        checkOut=2
106        echo "will make a new copy ( checkOut=$checkOut )"
107      fi
108    fi
109    
110    if [ $checkOut -ge 2 ] ; then
111      #---- cleaning:
112      cd $TDIR
113    
114      #---- Make a new clone or update existing one:
115      if test -e ${gcmDIR}/.git/config ; then
116        echo "${gcmDIR}/.git/config exist"
117      else
118        echo -n "${gcmDIR}/.git/config 'missing, "
119        checkOut=3
120        echo "will get new clone ( checkOut=$checkOut )"
121      fi
122      if [ $checkOut -eq 3 ] ; then
123        echo -n "Removing old clone: $TDIR/${gcmDIR} ..."
124        test -e $TDIR/${gcmDIR}  &&  rm -rf $TDIR/${gcmDIR}
125        echo "  done"
126        echo -n "Make a new clone of $git_code from repo: $git_repo ..."
127        git clone https://github.com/$git_repo/${git_code}.git ${gcmDIR} 2> $tmpFil
128        retVal=$?
129        if test $retVal = 0 ; then
130           echo ' --> done!'
131           rm -f $tmpFil
132        else
133           echo " Error: 'git clone' returned: $retVal"
134           cat $tmpFil
135           rm -f $tmpFil
136           exit 2
137      fi      fi
138      else
139        echo "Updating current clone ( $git_code ) ..."
140        ( cd ${gcmDIR}; git checkout master ; git pull )
141        echo ' --> done!'
142      fi
143  else  else
144  # create directory and download code    cd $TDIR
     if [ -e $TDIR ]; then  
         rm -rf $TDIR  
     fi  
     mkdir $TDIR  
     cd $TDIR  
     cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack co MITgcm > cvs_co.log 2>&1  
     if [ "$?" != "0" ]; then  
         cat cvs_co.log  
     fi  
145  fi  fi
146    
147  cd $TDIR/MITgcm/verification  cd $TDIR/MITgcm/verification
# Line 141  echo "********************************** Line 181  echo "**********************************
181  echo " " >> $MYOUTPUT  echo " " >> $MYOUTPUT
182    
183  # now submit the job that actually runs all the experiments in one go  # now submit the job that actually runs all the experiments in one go
184    echo "qsub $HERE/$JOBSCRIPT"
185  qsub $HERE/$JOBSCRIPT  qsub $HERE/$JOBSCRIPT
186  # keep looking for the job in the job queues and wait until has disappeared  # keep looking for the job in the job queues and wait until has disappeared
187  jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`  jobruns=`qstat -n -u mlosch | grep "$JOBNAME"`
# Line 160  echo "now run testreport for a final tim Line 201  echo "now run testreport for a final tim
201  echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT  echo "$RUNTESTREPORT -match 10 -runonly" >> $MYOUTPUT
202  #$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1  #$RUNTESTREPORT -match 10 -runonly >> $MYOUTPUT 2>&1
203  $RUNTESTREPORT -match 10 -runonly \  $RUNTESTREPORT -match 10 -runonly \
204      -a "jmc@mitgcm.org" >> $MYOUTPUT 2>&1      -a "jm_c@mitgcm.org" >> $MYOUTPUT 2>&1
205  #   -a "jmc@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1  #   -a "jm_c@mitgcm.org, Martin.Losch@awi.de" >> $MYOUTPUT 2>&1
206    
207  echo "end of mitgcmtestreport"  echo "end of mitgcmtestreport"

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22