| 8 |
|
|
| 9 |
if test $# = 0 |
if test $# = 0 |
| 10 |
then |
then |
| 11 |
TEST_LIST='o64Adm gfoTlm gfoMp2 ifort' |
TEST_LIST='o64Adm gfoAdm gfoTlm ifcMp2 ifcMpi' |
| 12 |
#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 |
| 13 |
else |
else |
| 14 |
TEST_LIST=$* |
TEST_LIST=$* |
| 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" |
| 54 |
NB_SUB_JOBS=0 |
NB_SUB_JOBS=0 |
| 55 |
for i in $JOB_LIST |
for i in $JOB_LIST |
| 56 |
do |
do |
| 57 |
case $i in |
sfx=`echo ${i} | sed -e 's/^.../&_/' -e 's/^o64/op64/' | tr '[:upper:]' '[:lower:]'` |
|
'o64Adm') sfx='op64_adm' ;; |
|
|
'gfoTlm') sfx='gfo_tlm' ;; |
|
|
'gfoMp2') sfx='gfo_mp2' ;; |
|
|
*) sfx=${i}'_mpi' ;; |
|
|
esac |
|
| 58 |
BATCH_SCRIPT="test_engag_$sfx" |
BATCH_SCRIPT="test_engag_$sfx" |
| 59 |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
| 60 |
JOB="tst_"$i |
#- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match |
| 61 |
job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l` |
# definition within $BATCH_SCRIPT slurm script |
| 62 |
|
JOB="${i}_tst" |
| 63 |
|
sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c |
| 64 |
|
#job_exist=`$QSTAT | grep $JOB | wc -l` |
| 65 |
|
job_exist=`$QLIST | grep $sJob | wc -l` |
| 66 |
if test "x_$job_exist" = x_0 ; then |
if test "x_$job_exist" = x_0 ; then |
| 67 |
#-- move previous output file |
#-- move previous output file |
| 68 |
outList=`ls $JOB.std??? 2> /dev/null` |
outList=`ls $JOB.std??? 2> /dev/null` |
| 87 |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
| 88 |
else |
else |
| 89 |
echo "--> $JOB :" | tee -a $LOG_FIL |
echo "--> $JOB :" | tee -a $LOG_FIL |
| 90 |
$QSTAT -a | grep $USER | grep $JOB | tee -a $LOG_FIL |
#$QSTAT | grep $JOB | tee -a $LOG_FIL |
| 91 |
|
$QLIST | grep $sJob | tee -a $LOG_FIL |
| 92 |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
| 93 |
fi |
fi |
| 94 |
else |
else |