/[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.2 by jmc, Wed Jan 27 22:45:34 2016 UTC revision 1.7 by jmc, Fri Jan 13 22:41:26 2017 UTC
# Line 14  else Line 14  else
14    TEST_LIST=$*    TEST_LIST=$*
15  fi  fi
16    
17  QSUB="qsub"  headNode=`hostname -s`
18  QSTAT="qstat"  #QSUB="qsub"
19  dNam=`hostname -s`  #QSTAT="qstat -a | grep $USER"
20    #dNam=$headNode
21    QSUB="/usr/bin/sbatch"
22    QSTAT="/usr/bin/squeue -u $USER"
23    dNam='svante'
24  HERE="$HOME/test_${dNam}"  HERE="$HOME/test_${dNam}"
25  TST_DISK="/net/fs09/d0/jm_c"  TST_DISK="/net/fs09/d0/jm_c"
26  TST_DIR="$TST_DISK/test_${dNam}"  TST_DIR="$TST_DISK/test_${dNam}"
# Line 51  export LC_ALL="en_US.UTF-8" Line 55  export LC_ALL="en_US.UTF-8"
55  #  Turn off stack limit for FIZHI & AD-tests  #  Turn off stack limit for FIZHI & AD-tests
56  ulimit -s unlimited  ulimit -s unlimited
57    
58  if test -f /etc/profile.d/modules.sh ; then  if test -f /etc/profile.d/modules.sh    ; then . /etc/profile.d/modules.sh    ; fi
59      . /etc/profile.d/modules.sh  if test -f /etc/profile.d/zz_modules.sh ; then . /etc/profile.d/zz_modules.sh ; fi
 fi  
60  #- load standard modules:  #- load standard modules:
61  module add fedora torque maui svante  #module add fedora slurm maui svante
62    module add slurm
63  module list                                             >> $LOG_FIL 2>&1  module list                                             >> $LOG_FIL 2>&1
64    
65  #- method to acces CVS:  #- method to acces CVS:
# Line 68  gcmDIR='MITgcm' Line 72  gcmDIR='MITgcm'
72  exp2add=''  exp2add=''
73  updFile='updated_code'  updFile='updated_code'
74    
75    echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL
76  cd $TST_DISK    | tee -a $LOG_FIL 2>&1  cd $TST_DISK    | tee -a $LOG_FIL 2>&1
77  pwd             | tee -a $LOG_FIL  pwd             | tee -a $LOG_FIL
78  if test ! -d $TST_DIR ; then  if test ! -d $TST_DIR ; then
# Line 81  if test ! -d $TST_DIR ; then Line 86  if test ! -d $TST_DIR ; then
86     fi     fi
87  fi  fi
88  cd $TST_DIR  cd $TST_DIR
89    pwd             | tee -a $LOG_FIL
90    
91  #- remove date/lock-file:  #- remove date/lock-file:
92  if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi  if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi
# Line 145  cd $OUT_DIR Line 151  cd $OUT_DIR
151      BATCH_SCRIPT="test_svante_$sfx"      BATCH_SCRIPT="test_svante_$sfx"
152      if test -f $SUB_DIR/$BATCH_SCRIPT ; then      if test -f $SUB_DIR/$BATCH_SCRIPT ; then
153        JOB="tst_"$i        JOB="tst_"$i
154        job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l`        job_exist=`$QSTAT | grep $JOB | wc -l`
155        if test "x_$job_exist" = x_0 ; then        if test "x_$job_exist" = x_0 ; then
156          #-- move previous output file          #-- move previous output file
157          outList=`ls $JOB.std??? 2> /dev/null`          outList=`ls $JOB.std??? 2> /dev/null`
# Line 170  cd $OUT_DIR Line 176  cd $OUT_DIR
176            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`
177        else        else
178            echo "--> $JOB :"                             | tee -a $LOG_FIL            echo "--> $JOB :"                             | tee -a $LOG_FIL
179            $QSTAT -a | grep $USER | grep $JOB            | tee -a $LOG_FIL            $QSTAT | grep $JOB                            | tee -a $LOG_FIL
180            echo ' job already exist => skip this test'   | tee -a $LOG_FIL            echo ' job already exist => skip this test'   | tee -a $LOG_FIL
181        fi        fi
182      else      else

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

  ViewVC Help
Powered by ViewVC 1.1.22