/[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.7 by jmc, Fri Jan 13 22:41:26 2017 UTC revision 1.10 by jmc, Mon Jan 16 14:20:00 2017 UTC
# Line 16  fi Line 16  fi
16    
17  headNode=`hostname -s`  headNode=`hostname -s`
18  #QSUB="qsub"  #QSUB="qsub"
19  #QSTAT="qstat -a | grep $USER"  #QSTAT="qstat -u $USER"
20  #dNam=$headNode  #dNam=$headNode
21  QSUB="/usr/bin/sbatch"  QSUB="/usr/bin/sbatch"
22  QSTAT="/usr/bin/squeue -u $USER"  #QSTAT="/usr/bin/qstat -u $USER"
23    QLIST="/usr/bin/squeue -u $USER"
24  dNam='svante'  dNam='svante'
25  HERE="$HOME/test_${dNam}"  HERE="$HOME/test_${dNam}"
26  TST_DISK="/net/fs09/d0/jm_c"  TST_DISK="/net/fs09/d0/jm_c"
# Line 150  cd $OUT_DIR Line 151  cd $OUT_DIR
151      esac      esac
152      BATCH_SCRIPT="test_svante_$sfx"      BATCH_SCRIPT="test_svante_$sfx"
153      if test -f $SUB_DIR/$BATCH_SCRIPT ; then      if test -f $SUB_DIR/$BATCH_SCRIPT ; then
154          #- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match
155          #  definition within $BATCH_SCRIPT slurm script
156        JOB="tst_"$i        JOB="tst_"$i
157        job_exist=`$QSTAT | grep $JOB | wc -l`        sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c
158          #job_exist=`$QSTAT | grep $JOB | wc -l`
159          job_exist=`$QLIST | grep $sJob | wc -l`
160        if test "x_$job_exist" = x_0 ; then        if test "x_$job_exist" = x_0 ; then
161          #-- move previous output file          #-- move previous output file
162          outList=`ls $JOB.std??? 2> /dev/null`          outList=`ls $JOB.std??? 2> /dev/null`
# Line 176  cd $OUT_DIR Line 181  cd $OUT_DIR
181            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`
182        else        else
183            echo "--> $JOB :"                             | tee -a $LOG_FIL            echo "--> $JOB :"                             | tee -a $LOG_FIL
184            $QSTAT | grep $JOB                            | tee -a $LOG_FIL            #$QSTAT | grep $JOB                           | tee -a $LOG_FIL
185              $QLIST | grep $sJob                           | tee -a $LOG_FIL
186            echo ' job already exist => skip this test'   | tee -a $LOG_FIL            echo ' job already exist => skip this test'   | tee -a $LOG_FIL
187        fi        fi
188      else      else

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

  ViewVC Help
Powered by ViewVC 1.1.22