Wayne State University

AIM HIGHER

Wayne State University

High Performance Computing Services

$PBS_NODEFILE Environment Variable

$PBS_NODEFILE is a variable containing the file name such as /var/spool/PBS/aux/319092.vpbs1 that contains the list of nodes. The file will contain one node name per line for each core assigned to the job.

In this example we start a multinode interactive job. Type:

qsub -l -q asxq -l nodes=2:ppn=4

Input: qsub -I -q wsuq -l nodes=2:ppn=4

Note: The asxq is no longer operational, as all asx nodes are now a part of the wsuq.

Value of the variable $PBS_NODEFILE

Type:

'echo $PBS_NODEFILE'

Input: echo $PBS_NODEFILE
The result is /var/spool/PBS/aux/319092.vpbs1.

Contents of the file $PBS_NODEFILE (defaults to grouping by cores per node)

Type:

cat $PBS_NODEFILE

Input: cat $PBS_NODEFILE

Creating a node list irrespective of cores per node: This could be piped to a new file location for use with some programs that get confused when the same node name appears multiple times.

Type:

cat $PBS_NODEFILE | sort -u

Input: cat $PBS_NODEFILE | sort -u

Rearrange grouping by nodes instead of grouping by cores per node.

Type:

for i in `seq 1 ${NCPUS}`; do cat $PBS_NODEFILE | sort -u; done

Input: for i in `seq 1 ${NCPUS}`; do cat $PBS_NODEFILE | sort -u; done

Randomizing the list.

Type:

for i in `cat $PBS_NODEFILE`; do echo "$RANDOM $i"; done | sort | sed -r 's/^[0-9]+ //'

/export/usr/pgi/linux86-64_2.6/current/bin/pgCC
Input: for i in `cat $PBS_NODEFILE`; do echo ″$RANDOM $i″; done | sort | sed -r 's/^[0-9]+ //'
Computer Center Services * 5925 Woodward Avenue Detroit, Michigan 48202