[torqueusers] How to set the calling interval of prologue script when job queued by it

Xiangqian Wang jascha.wang at gmail.com
Thu Feb 9 03:33:21 MST 2012


I need a prologue script to ensure some preparation is done before my job
starts, here is my simple script file:

#!/bin/sh
if [ -f /opt/share/prepared ]
then
 echo `date` ": ready"
 exit 0
fi
echo `date` ": not ready"
exit 2
Using the following job script, i can prevent the job from running before
the preparation file comes up.

#!/bin/sh
#PBS -N prologure-job
#PBS -l nodes=snode01
#PBS -l prologue=/opt/share/shell/prologue.scs
#PBS -q batch
#PBS -d /opt/share/job
#PBS -p 10
#PBS -o $PBS_JOBID.o
#PBS -e $PBS_JOBID.e
# cd $PBS_O_WORKDIR
date
ping localhost -c 20
date
But what i'm not satisfied is that the prologue script is called frequently
when the job is queued, approximately 1 second after the other, see my job
output file:

Thu Feb 9 18:07:32 CST 2012 : not ready
Thu Feb 9 18:07:33 CST 2012 : not ready
Thu Feb 9 18:07:34 CST 2012 : not ready
Thu Feb 9 18:07:35 CST 2012 : not ready
Thu Feb 9 18:07:36 CST 2012 : not ready
Thu Feb 9 18:07:37 CST 2012 : not ready
Thu Feb 9 18:07:38 CST 2012 : not ready
Thu Feb 9 18:07:39 CST 2012 : not ready
Thu Feb 9 18:07:40 CST 2012 : not ready
Thu Feb 9 18:07:41 CST 2012 : not ready
Thu Feb 9 18:07:42 CST 2012 : not ready
...

and the job state switch between 'Q' and 'R', irregularly.

Now what i want to know is:
1. how to set a longer interval of calling the prologure script, maybe 5+
minutes is OK?
2. is it normal that the job state switch between 'Q' and 'R', shouldn't it
always be 'Q'?

Thanks for your concern.

Xiangqian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20120209/702fdce3/attachment.html 


More information about the torqueusers mailing list