/[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.5 by jmc, Sun Feb 26 23:32:00 2017 UTC revision 1.7 by jmc, Thu Aug 16 13:31:15 2018 UTC
# Line 15  else Line 15  else
15  fi  fi
16    
17  QSUB="/usr/bin/sbatch"  QSUB="/usr/bin/sbatch"
18  QSTAT="/usr/bin/qstat"  #QSTAT="/usr/bin/qstat -u $USER"
19    QLIST="/usr/bin/squeue -u $USER"
20  dNam='engaging'  dNam='engaging'
21  HERE="$HOME/test_$dNam"  HERE="$HOME/test_$dNam"
22  TST_DIR="/pool001/jm_c/test_$dNam"  TST_DIR="/pool001/jm_c/test_$dNam"
# Line 60  module list                                            >> $LOG_FIL 2>&1 Line 61  module list                                            >> $LOG_FIL 2>&1
61      esac      esac
62      BATCH_SCRIPT="test_engag_$sfx"      BATCH_SCRIPT="test_engag_$sfx"
63      if test -f $SUB_DIR/$BATCH_SCRIPT ; then      if test -f $SUB_DIR/$BATCH_SCRIPT ; then
64        JOB="tst_"$i        #- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match
65        job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l`        #  definition within $BATCH_SCRIPT slurm script
66          JOB="${i}_tst"
67          sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c
68          #job_exist=`$QSTAT | grep $JOB | wc -l`
69          job_exist=`$QLIST | grep $sJob | wc -l`
70        if test "x_$job_exist" = x_0 ; then        if test "x_$job_exist" = x_0 ; then
71          #-- move previous output file          #-- move previous output file
72          outList=`ls $JOB.std??? 2> /dev/null`          outList=`ls $JOB.std??? 2> /dev/null`
# Line 86  module list                                            >> $LOG_FIL 2>&1 Line 91  module list                                            >> $LOG_FIL 2>&1
91            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`
92        else        else
93            echo "--> $JOB :"                             | tee -a $LOG_FIL            echo "--> $JOB :"                             | tee -a $LOG_FIL
94            $QSTAT -a | grep $USER | grep $JOB            | tee -a $LOG_FIL            #$QSTAT | grep $JOB                           | tee -a $LOG_FIL
95              $QLIST | grep $sJob                           | tee -a $LOG_FIL
96            echo ' job already exist => skip this test'   | tee -a $LOG_FIL            echo ' job already exist => skip this test'   | tee -a $LOG_FIL
97        fi        fi
98      else      else

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

  ViewVC Help
Powered by ViewVC 1.1.22