/[MITgcm]/MITgcm_contrib/test_scripts/engaging/test_submit_engag
ViewVC logotype

Diff of /MITgcm_contrib/test_scripts/engaging/test_submit_engag

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

revision 1.1 by jmc, Mon Oct 19 18:23:42 2015 UTC revision 1.2 by jmc, Wed Oct 21 14:01:55 2015 UTC
# Line 8  dInWeek=`date +%a` Line 8  dInWeek=`date +%a`
8    
9  if test $# = 0  if test $# = 0
10  then  then
   TEST_LIST='gnu mp2 adm pgi path mth op64 tuv'  
11    TEST_LIST='o64Adm gfoTlm'    TEST_LIST='o64Adm gfoTlm'
  #if test "x$dInWeek" = xSat ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi  
12   #if test "x$dInWeek" = xSun ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi   #if test "x$dInWeek" = xSun ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi
13  else  else
14    TEST_LIST=$*    TEST_LIST=$*
# Line 26  logPfix='test_submit' Line 24  logPfix='test_submit'
24  SUB_DIR="$HERE/engaging"  SUB_DIR="$HERE/engaging"
25  OUT_DIR="$HERE/output"  OUT_DIR="$HERE/output"
26  LOG_FIL="$OUT_DIR/$logPfix."`date +%m%d`".log"  LOG_FIL="$OUT_DIR/$logPfix."`date +%m%d`".log"
27    #SUB_DIR="$HERE/temp"
28    
29  #-- clean up old log files and start a new one:  #-- clean up old log files and start a new one:
30  cd $OUT_DIR  cd $OUT_DIR
# Line 45  fi Line 44  fi
44  . /etc/profile.d/modules.sh  . /etc/profile.d/modules.sh
45  module list >> $LOG_FIL 2>&1  module list >> $LOG_FIL 2>&1
46    
 #-- now really do something:  
 #cd $HERE  
47  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
48    #-- now really do something:
49    
50    JOB_LIST=$TEST_LIST    JOB_LIST=$TEST_LIST
51    NB_SUB_JOBS=0    NB_SUB_JOBS=0
# Line 66  module list >> $LOG_FIL 2>&1 Line 64  module list >> $LOG_FIL 2>&1
64          #-- move previous output file          #-- move previous output file
65          outList=`ls $JOB.std??? 2> /dev/null`          outList=`ls $JOB.std??? 2> /dev/null`
66          if test "x$outList" != x ; then          if test "x$outList" != x ; then
67            echo -n " moving job $JOB old output files:"            echo -n " moving job $JOB old output files:" | tee -a $LOG_FIL
68            if test -d $OUT_DIR/prev ; then            if test -d $OUT_DIR/prev ; then
69              for xx in $outList ; do              for xx in $outList ; do
70                echo -n " $xx"                echo -n " $xx" | tee -a $LOG_FIL
71                mv -f $xx $OUT_DIR/prev                mv -f $xx $OUT_DIR/prev
72              done              done
73              echo " to dir $OUT_DIR/prev"              echo " to dir ./prev" | tee -a $LOG_FIL
74            else            else
75              echo " <-- missing dir $OUT_DIR/prev"              echo " <-- missing dir $OUT_DIR/prev" | tee -a $LOG_FIL
76            fi            fi
77          else echo " no old output files from job '$JOB'"          else echo " no old output files from job '$JOB'" | tee -a $LOG_FIL
78          fi          fi
79          #-- submit job          #-- submit job
80            echo -n " $JOB : " | tee -a $LOG_FIL            echo -n "--> $JOB : " | tee -a $LOG_FIL
81            $QSUB $SUB_DIR/$BATCH_SCRIPT | tee -a $LOG_FIL            $QSUB $SUB_DIR/$BATCH_SCRIPT | tee -a $LOG_FIL
          #eval M_$i='submitted'  
82            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`
83        else        else
84            echo $JOB | tee -a $LOG_FIL            echo "--> $JOB :" | tee -a $LOG_FIL
85            $QSTAT -a | grep $USER | grep $JOB | tee -a $LOG_FIL            $QSTAT -a | grep $USER | grep $JOB | tee -a $LOG_FIL
86            echo 'job already exist => skip this test' | tee -a $LOG_FIL            echo ' job already exist => skip this test' | tee -a $LOG_FIL
          #eval M_$i='skipped'  
87        fi        fi
88      else      else
89         echo 'no file:' $BATCH_SCRIPT 'to submit' | tee -a $LOG_FIL         echo 'no file:' $BATCH_SCRIPT 'to submit' | tee -a $LOG_FIL
       #eval M_$i='skipped'  
90      fi      fi
91    done    done
92    echo " info-sub-list: NB_SUB_JOBS='$NB_SUB_JOBS'" >> $LOG_FIL    echo "info-sub-list: NB_SUB_JOBS='$NB_SUB_JOBS'" >> $LOG_FIL
93    
94  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|  #---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
95  exit 0  exit 0

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

  ViewVC Help
Powered by ViewVC 1.1.22