| 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 |
| 15 |
|
|
| 16 |
QSUB="qsub" |
headNode=`hostname -s` |
| 17 |
QSTAT="qstat" |
#QSUB="qsub" |
| 18 |
dNam=`hostname -s` |
#QSTAT="qstat -u $USER" |
| 19 |
|
#dNam=$headNode |
| 20 |
|
QSUB="/usr/bin/sbatch" |
| 21 |
|
QLIST="/usr/bin/squeue -u $USER" |
| 22 |
|
dNam='svante' |
| 23 |
HERE="$HOME/test_${dNam}" |
HERE="$HOME/test_${dNam}" |
| 24 |
TST_DISK="/net/fs09/d0" |
TST_DISK="/net/fs09/d0/jm_c" |
| 25 |
TST_DIR="$TST_DISK/jm_c/test_${dNam}" |
TST_DIR="$TST_DISK/test_${dNam}" |
| 26 |
logPfix='test_submit' |
logPfix='test_submit' |
| 27 |
|
|
| 28 |
SUB_DIR="$HERE/$dNam" |
SUB_DIR="$HERE/$dNam" |
| 54 |
# Turn off stack limit for FIZHI & AD-tests |
# Turn off stack limit for FIZHI & AD-tests |
| 55 |
ulimit -s unlimited |
ulimit -s unlimited |
| 56 |
|
|
| 57 |
if test -f /etc/profile.d/modules.sh ; then |
if test -f /etc/profile.d/modules.sh ; then . /etc/profile.d/modules.sh ; fi |
| 58 |
. /etc/profile.d/modules.sh |
if test -f /etc/profile.d/zz_modules.sh ; then . /etc/profile.d/zz_modules.sh ; fi |
|
fi |
|
| 59 |
#- load standard modules: |
#- load standard modules: |
| 60 |
module add fedora torque maui svante |
#module add fedora slurm maui svante |
| 61 |
|
module add slurm |
| 62 |
module list >> $LOG_FIL 2>&1 |
module list >> $LOG_FIL 2>&1 |
| 63 |
|
|
| 64 |
#- method to acces CVS: |
#- method to acces CVS: |
| 71 |
exp2add='' |
exp2add='' |
| 72 |
updFile='updated_code' |
updFile='updated_code' |
| 73 |
|
|
| 74 |
echo "cd $TST_DISK ; pwd" | tee -a $LOG_FIL |
echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL |
| 75 |
cd $TST_DISK | tee -a $LOG_FIL 2>&1 |
cd $TST_DISK | tee -a $LOG_FIL 2>&1 |
| 76 |
pwd | tee -a $LOG_FIL |
pwd | tee -a $LOG_FIL |
| 77 |
if test ! -d $TST_DIR ; then |
if test ! -d $TST_DIR ; then |
| 85 |
fi |
fi |
| 86 |
fi |
fi |
| 87 |
cd $TST_DIR |
cd $TST_DIR |
| 88 |
|
pwd | tee -a $LOG_FIL |
| 89 |
|
|
| 90 |
#- remove date/lock-file: |
#- remove date/lock-file: |
| 91 |
if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi |
if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi |
| 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="tst_"$i |
#- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match |
| 153 |
job_exist=`$QSTAT -a | grep $USER | 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` |
| 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 -a | grep $USER | 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 |