15 |
|
|
16 |
headNode=`hostname -s` |
headNode=`hostname -s` |
17 |
#QSUB="qsub" |
#QSUB="qsub" |
18 |
#QSTAT="qstat -u $USER" |
#QLIST="qstat -u $USER" |
19 |
#dNam=$headNode |
#dNam=$headNode |
20 |
QSUB="/usr/bin/sbatch" |
QSUB="/usr/bin/sbatch" |
21 |
QLIST="/usr/bin/squeue -u $USER" |
QLIST="/usr/bin/squeue -u $USER" |
211 |
# definition within $BATCH_SCRIPT slurm script |
# definition within $BATCH_SCRIPT slurm script |
212 |
JOB="${i}_tst" |
JOB="${i}_tst" |
213 |
sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c |
sJob=`printf "%8.8s" $JOB` #- squeue truncate name to only 1rst 8c |
214 |
#job_exist=`$QSTAT | grep $JOB | wc -l` |
#job_exist=`$QLIST | grep $JOB | wc -l` |
215 |
job_exist=`$QLIST | grep $sJob | wc -l` |
job_exist=`$QLIST | grep $sJob | wc -l` |
216 |
if test "x_$job_exist" = x_0 ; then |
if test "x_$job_exist" = x_0 ; then |
217 |
#-- move previous output file |
#-- move previous output file |
232 |
else echo " no old output files from job '$JOB'" | tee -a $LOG_FIL |
else echo " no old output files from job '$JOB'" | tee -a $LOG_FIL |
233 |
fi |
fi |
234 |
#-- submit job |
#-- submit job |
235 |
echo -n "--> $JOB : " | tee -a $LOG_FIL |
echo -n "--> $JOB : $BATCH_SCRIPT , " | tee -a $LOG_FIL |
236 |
$QSUB $SUB_DIR/$BATCH_SCRIPT | tee -a $LOG_FIL |
$QSUB $SUB_DIR/$BATCH_SCRIPT | tee -a $LOG_FIL |
237 |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
NB_SUB_JOBS=`expr $NB_SUB_JOBS + 1` |
238 |
sleep 1 |
sleep 1 |
239 |
else |
else |
240 |
echo "--> $JOB :" | tee -a $LOG_FIL |
echo "--> $JOB :" | tee -a $LOG_FIL |
|
#$QSTAT | grep $JOB | tee -a $LOG_FIL |
|
241 |
$QLIST | grep $sJob | tee -a $LOG_FIL |
$QLIST | grep $sJob | tee -a $LOG_FIL |
242 |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
echo ' job already exist => skip this test' | tee -a $LOG_FIL |
243 |
fi |
fi |
245 |
echo 'no file:' $BATCH_SCRIPT 'to submit' | tee -a $LOG_FIL |
echo 'no file:' $BATCH_SCRIPT 'to submit' | tee -a $LOG_FIL |
246 |
fi |
fi |
247 |
done |
done |
248 |
echo "info-sub-list: NB_SUB_JOBS='$NB_SUB_JOBS'" >> $LOG_FIL |
#echo "info-sub-list: NB_SUB_JOBS='$NB_SUB_JOBS'" >> $LOG_FIL |
249 |
|
echo "Submitted $NB_SUB_JOBS jobs from dir: $SUB_DIR" | tee -a $LOG_FIL |
250 |
echo -n '-- Finished at: ' | tee -a $LOG_FIL |
echo -n '-- Finished at: ' | tee -a $LOG_FIL |
251 |
date | tee -a $LOG_FIL |
date | tee -a $LOG_FIL |
252 |
|
|