6 |
today=`date +%Y%m%d` |
today=`date +%Y%m%d` |
7 |
dInWeek=`date +%a` |
dInWeek=`date +%a` |
8 |
|
|
9 |
|
#- select type of BATCH_SCRIPT to submit: |
10 |
|
typ='' |
11 |
|
if [ $# -ge 1 ] ; then |
12 |
|
case $1 in |
13 |
|
'c6'|'c7') typ=".$1" ; shift ;; |
14 |
|
esac |
15 |
|
fi |
16 |
|
|
17 |
if test $# = 0 |
if test $# = 0 |
18 |
then |
then |
19 |
TEST_LIST='o64Adm gfoTlm ifcMp2 ifcMpi' |
TEST_LIST='o64Adm gfoAdm gfoTlm ifcMp2 ifcMpi' |
20 |
#if test "x$dInWeek" = xSun ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi |
#if test "x$dInWeek" = xSun ; then TEST_LIST="$TEST_LIST iad ifc oad" ; fi |
21 |
else |
else |
22 |
TEST_LIST=$* |
TEST_LIST=$* |
23 |
fi |
fi |
24 |
|
|
25 |
QSUB="/usr/bin/sbatch" |
QSUB="/usr/bin/sbatch" |
26 |
QSTAT="/usr/bin/qstat" |
#QSTAT="/usr/bin/qstat -u $USER" |
27 |
|
QLIST="/usr/bin/squeue -u $USER" |
28 |
dNam='engaging' |
dNam='engaging' |
29 |
HERE="$HOME/test_$dNam" |
HERE="$HOME/test_$dNam" |
30 |
TST_DIR="/pool001/jm_c/test_$dNam" |
TST_DIR="/pool001/jm_c/test_$dNam" |
62 |
NB_SUB_JOBS=0 |
NB_SUB_JOBS=0 |
63 |
for i in $JOB_LIST |
for i in $JOB_LIST |
64 |
do |
do |
65 |
case $i in |
sfx=`echo ${i} | sed -e 's/^.../&_/' -e 's/^o64/op64/' | tr '[:upper:]' '[:lower:]'` |
66 |
'o64Adm') sfx='op64_adm' ;; |
BATCH_SCRIPT="test_engag_${sfx}${typ}" |
|
'gfoTlm') sfx='gfo_tlm' ;; |
|
|
*) sfx=`echo ${i} | sed '/Mp.$/s/Mp/_mp/'` ;; |
|
|
esac |
|
|
BATCH_SCRIPT="test_engag_$sfx" |
|
67 |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
68 |
JOB="tst_"$i |
#- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match |
69 |
job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l` |
# definition within $BATCH_SCRIPT slurm script |
70 |
|
JOB="${i}_tst" |
71 |
|
sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c |
72 |
|
#job_exist=`$QSTAT | grep $JOB | wc -l` |
73 |
|
job_exist=`$QLIST | grep $sJob | wc -l` |
74 |
if test "x_$job_exist" = x_0 ; then |
if test "x_$job_exist" = x_0 ; then |
75 |
#-- move previous output file |
#-- move previous output file |
76 |
outList=`ls $JOB.std??? 2> /dev/null` |
outList=`ls $JOB.std??? 2> /dev/null` |
95 |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
96 |
else |
else |
97 |
echo "--> $JOB :" | tee -a $LOG_FIL |
echo "--> $JOB :" | tee -a $LOG_FIL |
98 |
$QSTAT -a | grep $USER | grep $JOB | tee -a $LOG_FIL |
#$QSTAT | grep $JOB | tee -a $LOG_FIL |
99 |
|
$QLIST | grep $sJob | tee -a $LOG_FIL |
100 |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
101 |
fi |
fi |
102 |
else |
else |