[torqueusers] load environment variables before parsing PBS script

Axel Kohlmeyer akohlmey at cmm.chem.upenn.edu
Tue Jan 3 09:26:03 MST 2012


On Tue, Jan 3, 2012 at 11:23 AM, Ashish Agarwal <agarwal1975 at gmail.com> wrote:
> 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
> script?

try: man env

axel

>
> 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?
>
>
> _______________________________________________
> torqueusers mailing list
> torqueusers at supercluster.org
> http://www.supercluster.org/mailman/listinfo/torqueusers
>



-- 
Dr. Axel Kohlmeyer    akohlmey at gmail.com
http://sites.google.com/site/akohlmey/

Institute for Computational Molecular Science
Temple University, Philadelphia PA, USA.


More information about the torqueusers mailing list