[torqueusers] load environment variables before parsing PBS script

Ashish Agarwal agarwal1975 at gmail.com
Tue Jan 3 09:23:38 MST 2012

On our cluster we have Python 2.4.3 installed in the system location, but I
would like to write a PBS script using Python 2.7.2. The latter requires me
to first load some environment variables. How can I do this within a PBS

Here's a test script:

---- python.pbs ----
#!/usr/bin/env python

#PBS -o /home/<user>/$PBS_JOBID.out
#PBS -j oe

import sys
print sys.version

Submitting this will print 2.4.3. Now, how can I make this script print
2.7.2, which requires me to run some bash commands first?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.supercluster.org/pipermail/torqueusers/attachments/20120103/90b97e8c/attachment.html 

More information about the torqueusers mailing list