/[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.8 by jmc, Sat Jan 14 16:20:04 2017 UTC revision 1.14 by jmc, Fri Apr 21 19:44:26 2017 UTC
# Line 8  dInWeek=`date +%a` Line 8  dInWeek=`date +%a`
8    
9  if test $# = 0  if test $# = 0
10  then  then
11    TEST_LIST='pgiMPI'    TEST_LIST='ifcMPI pgiMPI pgiAdm pgiMth'
  #if test "x$dInWeek" = xSun ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi  
12  else  else
13    TEST_LIST=$*    TEST_LIST=$*
14  fi  fi
# Line 19  headNode=`hostname -s` Line 18  headNode=`hostname -s`
18  #QSTAT="qstat -u $USER"  #QSTAT="qstat -u $USER"
19  #dNam=$headNode  #dNam=$headNode
20  QSUB="/usr/bin/sbatch"  QSUB="/usr/bin/sbatch"
21  QSTAT="/usr/bin/squeue -u $USER"  QLIST="/usr/bin/squeue -u $USER"
22  dNam='svante'  dNam='svante'
23  HERE="$HOME/test_${dNam}"  HERE="$HOME/test_${dNam}"
24  TST_DISK="/net/fs09/d0/jm_c"  TST_DISK="/net/fs09/d0/jm_c"
# Line 144  cd $OUT_DIR Line 143  cd $OUT_DIR
143    for i in $JOB_LIST    for i in $JOB_LIST
144    do    do
145      case $i in      case $i in
       'pgiMPI') sfx='pgi_mpi' ;;  
146        'pgiAdm') sfx='pgi_adm' ;;        'pgiAdm') sfx='pgi_adm' ;;
147               *) sfx=${i}'_mpi'  ;;        'pgiMth') sfx='pgi_mth' ;;
148                 *) sfx=`echo ${i} | sed 's/MPI$/_mpi/'`  ;;
149      esac      esac
150      BATCH_SCRIPT="test_svante_$sfx"      BATCH_SCRIPT="test_${dNam}_$sfx"
151      if test -f $SUB_DIR/$BATCH_SCRIPT ; then      if test -f $SUB_DIR/$BATCH_SCRIPT ; then
152        JOB="t_"$i        #- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match
153        job_exist=`$QSTAT | grep $JOB | wc -l`        #  definition within $BATCH_SCRIPT slurm script
154          JOB="${i}_tst"
155          sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c
156          #job_exist=`$QSTAT | grep $JOB | wc -l`
157          job_exist=`$QLIST | grep $sJob | wc -l`
158        if test "x_$job_exist" = x_0 ; then        if test "x_$job_exist" = x_0 ; then
159          #-- move previous output file          #-- move previous output file
160          outList=`ls $JOB.std??? 2> /dev/null`          outList=`ls $JOB.std??? 2> /dev/null`
# Line 176  cd $OUT_DIR Line 179  cd $OUT_DIR
179            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`            NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1`
180        else        else
181            echo "--> $JOB :"                             | tee -a $LOG_FIL            echo "--> $JOB :"                             | tee -a $LOG_FIL
182            $QSTAT | grep $JOB                            | tee -a $LOG_FIL            #$QSTAT | grep $JOB                           | tee -a $LOG_FIL
183              $QLIST | grep $sJob                           | tee -a $LOG_FIL
184            echo ' job already exist => skip this test'   | tee -a $LOG_FIL            echo ' job already exist => skip this test'   | tee -a $LOG_FIL
185        fi        fi
186      else      else

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.22