14 |
TEST_LIST=$* |
TEST_LIST=$* |
15 |
fi |
fi |
16 |
|
|
17 |
|
headNode=`hostname -s` |
18 |
#QSUB="qsub" |
#QSUB="qsub" |
19 |
#QSTAT="qstat" |
#QSTAT="qstat -a | grep $USER" |
20 |
#dNam=`hostname -s` |
#dNam=$headNode |
21 |
QSUB="/usr/bin/sbatch" |
QSUB="/usr/bin/sbatch" |
22 |
QSTAT="/usr/bin/qstat" |
QSTAT="/usr/bin/squeue -u $USER" |
23 |
dNam='svante' |
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" |
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` |
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 |