Wednesday, January 2, 2008

Setting environment variables in PBS scripts

I find that the easiest way to set an environment variable in a PBS script, is to set it the variable in the shell from which you submit the job to the queue (i.e. with qsub).

Add this line to your PBS script header:

This will cause the node to inherit the environment variable from your local shell. Should work for typical cluster jobs.