Batch Environment Variables
Systems:
Lens, Sith, Smoky, Titan
Categories: Running Jobs
Categories: Running Jobs
See this article in context within the following user guides: Titan
PBS sets multiple environment variables at submission time. The following PBS variables are useful within batch scripts:
Variable | Description |
---|---|
$PBS_O_WORKDIR |
The directory from which the batch job was submitted. By default, a new job starts in your home directory. You can get back to the directory of job submission with cd $PBS_O_WORKDIR . Note that this is not necessarily the same directory in which the batch script resides. |
$PBS_JOBID |
The job’s full identifier. A common use for PBS_JOBID is to append the job’s ID to the standard output and error files. |
$PBS_NUM_NODES |
The number of nodes requested. |
$PBS_NUM_PPN |
The number of cores requested. |
$PBS_JOBNAME |
The job name supplied by the user. |
$PBS_NODEFILE |
The name of the file containing the list of nodes assigned to the job. Used sometimes on non-Cray clusters. |