| 14 |
TEST_LIST=$* |
TEST_LIST=$* |
| 15 |
fi |
fi |
| 16 |
|
|
| 17 |
QSUB="qsub" |
headNode=`hostname -s` |
| 18 |
QSTAT="qstat" |
#QSUB="qsub" |
| 19 |
dNam=`hostname -s` |
#QSTAT="qstat -u $USER" |
| 20 |
HERE="$HOME/test_$dNam" |
#dNam=$headNode |
| 21 |
TST_DIR="/net/fs09/d0/jm_c/test_${dNam}" |
QSUB="/usr/bin/sbatch" |
| 22 |
|
#QSTAT="/usr/bin/qstat -u $USER" |
| 23 |
|
SLIST="/usr/bin/squeue -u $USER" |
| 24 |
|
dNam='svante' |
| 25 |
|
HERE="$HOME/test_${dNam}" |
| 26 |
|
TST_DISK="/net/fs09/d0/jm_c" |
| 27 |
|
TST_DIR="$TST_DISK/test_${dNam}" |
| 28 |
logPfix='test_submit' |
logPfix='test_submit' |
| 29 |
|
|
| 30 |
SUB_DIR="$HERE/$dNam" |
SUB_DIR="$HERE/$dNam" |
| 56 |
# Turn off stack limit for FIZHI & AD-tests |
# Turn off stack limit for FIZHI & AD-tests |
| 57 |
ulimit -s unlimited |
ulimit -s unlimited |
| 58 |
|
|
| 59 |
if test -f /etc/profile.d/modules.sh ; then |
if test -f /etc/profile.d/modules.sh ; then . /etc/profile.d/modules.sh ; fi |
| 60 |
. /etc/profile.d/modules.sh |
if test -f /etc/profile.d/zz_modules.sh ; then . /etc/profile.d/zz_modules.sh ; fi |
|
fi |
|
| 61 |
#- load standard modules: |
#- load standard modules: |
| 62 |
module add fedora torque maui svante |
#module add fedora slurm maui svante |
| 63 |
|
module add slurm |
| 64 |
module list >> $LOG_FIL 2>&1 |
module list >> $LOG_FIL 2>&1 |
| 65 |
|
|
| 66 |
#- method to acces CVS: |
#- method to acces CVS: |
| 73 |
exp2add='' |
exp2add='' |
| 74 |
updFile='updated_code' |
updFile='updated_code' |
| 75 |
|
|
| 76 |
|
echo "cd $TST_DISK ; pwd (x2)" | tee -a $LOG_FIL |
| 77 |
|
cd $TST_DISK | tee -a $LOG_FIL 2>&1 |
| 78 |
|
pwd | tee -a $LOG_FIL |
| 79 |
if test ! -d $TST_DIR ; then |
if test ! -d $TST_DIR ; then |
| 80 |
echo -n "Creating a working dir: $TST_DIR ..." | tee -a $LOG_FIL |
echo -n "Creating a working dir: $TST_DIR ..." | tee -a $LOG_FIL |
| 81 |
/bin/rm -rf $TST_DIR |
#/bin/rm -rf $TST_DIR |
| 82 |
mkdir $TST_DIR |
mkdir $TST_DIR |
| 83 |
retVal=$? |
retVal=$? |
| 84 |
if test "x$retVal" != x0 ; then |
if test "x$retVal" != x0 ; then |
| 87 |
fi |
fi |
| 88 |
fi |
fi |
| 89 |
cd $TST_DIR |
cd $TST_DIR |
| 90 |
|
pwd | tee -a $LOG_FIL |
| 91 |
|
|
| 92 |
#- remove date/lock-file: |
#- remove date/lock-file: |
| 93 |
if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi |
if test -f $updFile ; then rm -f $updFile ; sleep 2 ; fi |
| 151 |
esac |
esac |
| 152 |
BATCH_SCRIPT="test_svante_$sfx" |
BATCH_SCRIPT="test_svante_$sfx" |
| 153 |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
if test -f $SUB_DIR/$BATCH_SCRIPT ; then |
| 154 |
|
#- job name ( $JOB ) & output-file name ( $JOB.std??? ) must match |
| 155 |
|
# definition within $BATCH_SCRIPT slurm script |
| 156 |
JOB="tst_"$i |
JOB="tst_"$i |
| 157 |
job_exist=`$QSTAT -a | grep $USER | grep $JOB | wc -l` |
sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c |
| 158 |
|
#job_exist=`$QSTAT | grep $JOB | wc -l` |
| 159 |
|
job_exist=`$QLIST | grep $sJob | wc -l` |
| 160 |
if test "x_$job_exist" = x_0 ; then |
if test "x_$job_exist" = x_0 ; then |
| 161 |
#-- move previous output file |
#-- move previous output file |
| 162 |
outList=`ls $JOB.std??? 2> /dev/null` |
outList=`ls $JOB.std??? 2> /dev/null` |
| 181 |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
| 182 |
else |
else |
| 183 |
echo "--> $JOB :" | tee -a $LOG_FIL |
echo "--> $JOB :" | tee -a $LOG_FIL |
| 184 |
$QSTAT -a | grep $USER | grep $JOB | tee -a $LOG_FIL |
#$QSTAT | grep $JOB | tee -a $LOG_FIL |
| 185 |
|
$QLIST | grep $sJob | tee -a $LOG_FIL |
| 186 |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
| 187 |
fi |
fi |
| 188 |
else |
else |