[torqueusers] PBS environmental variables and -V

Glen Beane glen.beane at gmail.com
Tue Jan 22 13:42:02 MST 2013


On Tue, Jan 22, 2013 at 2:22 PM, Matthew Britt <msbritt at umich.edu> wrote:
> Hello everyone.   What is the expected behavior in precedence between PBS environmental variables and -V when a job is submitted  from an interactive job.  With torque 4.1.4 (and possibly earlier), the variables from the environment of the interactive shell are passed along w/ the newly submitted job (either interactive or batch).   We've seen both PBS_O_HOST and PBS_O_WORKDIR be set to values of the first job rather than the attributes of the second job.
>
> As an example:
>
> [msbritt at nyx ~]$ cd bin
> [msbritt at nyx bin]$ pwd
> /home/msbritt/bin
> [msbritt at nyx bin]$ qsub -I -l nodes=1,walltime=5:00 -q flux -A msbritt_flux -V
> qsub: waiting for job 9445802.nyx.engin.umich.edu to start
> qsub: job 9445802.nyx.engin.umich.edu ready
>
> [msbritt at nyx5515 ~]$ echo $PBS_O_WORKDIR
> /home/msbritt/bin
> [msbritt at nyx5515 ~]$ echo $PBS_O_HOST
> nyx.engin.umich.edu
> [msbritt at nyx5515 ~]$ pwd
> /home/msbritt
>
> [msbritt at nyx5515 ~]$ qsub -I -l nodes=1,walltime=5:00 -q flux -A msbritt_flux -V
> qsub: waiting for job 9445813.nyx.engin.umich.edu to start
> qsub: job 9445813.nyx.engin.umich.edu ready
>
> [msbritt at nyx5623 ~]$ pwd
> /home/msbritt
> [msbritt at nyx5623 ~]$ echo $PBS_O_WORKDIR
> /home/msbritt/bin       (arguably should be /home/msbritt)
> [msbritt at nyx5623 ~]$ echo $PBS_O_HOST
> nyx.engin.umich.edu     (arguably should be nyx5515)
>

this seems like a bug to me -- it is not the behavior I would expect.


> Should -V not read the PBS_O_* variables on job submission or at least be overwritten and correctly set in the next job, or should -V trump ?

I think all PBS_ variables should be correctly set by TORQUE even if
they are already present in the environment passed by the -V argument


More information about the torqueusers mailing list