[torqueusers] Bash variables on #PBS lines

Lloyd Brown lloyd_brown at byu.edu
Wed Aug 17 15:15:17 MDT 2011


Does $WALLTIME exist in the shell you're submitting from?  You could put
it as a parameter to qsub, eg something like this:

qsub -l walltime=$WALLTIME myjobscript


What's going on here is that you want the variable to be interpolated by
the shell you're in, when you call qsub.  As far as I know, it doesn't
do any interpolation of the variables inside the job script (that could
cause some other really strange problems!).

We did something similar with job names (-N), and when we had lines like
this in our script:

#PBS -N case_$casenumber

All the jobs ended up named literally "case_$casenumber".  Our solution
was to do something more like this:

> for i in `seq -w 700`
> do
>     qsub -v casenumber=$i -N my_case$i_job submission_script
> done





Lloyd Brown
Systems Administrator
Fulton Supercomputing Lab
Brigham Young University
http://marylou.byu.edu

On 08/17/2011 11:44 AM, Denver Smith wrote:
> Is there any way to get this to work in my job submission script: 
> 
> #PBS -l walltime=$WALLTIME
> 
> I don't think it's picking up the value of WALLTIME.
> 
> Thanks!
> 
> 
> 
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers


More information about the torqueusers mailing list