[torqueusers] PBS environmental variables and -V

Matthew Britt msbritt at umich.edu
Tue Jan 22 12:22:07 MST 2013

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
[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
[msbritt at nyx5515 ~]$ echo $PBS_O_HOST
[msbritt at nyx5515 ~]$ pwd

[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
[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)

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 ?

   - Matt
Matthew Britt
CAEN HPC Group - College of Engineering
msbritt at umich.edu

More information about the torqueusers mailing list