[torqueusers] NCPUS environment variable?

Garrick Staples garrick at usc.edu
Sat Jul 16 17:42:02 MDT 2005


On Sat, Jul 16, 2005 at 03:03:54PM -0700, Martin Siegert alleged:
> #PBS -l ncpus=<x>
> a) sets PBS_NODENUM to 0
> b) sets PBS_TASKNUM to 1
> c) prints "numnodes=1 numvnod=1" to the logfile (for LOGLEVEL >= 2)
> d) qstat shows -- under the NDS and <x> under the TSK columns
> e) creates a one line PBS_NODEFILE containing a single host
> 
> #PBS -l nodes=<y>:ppn=<z>
> a) sets PBS_NODENUM to 0
> b) sets PBS_TASKNUM to 1
> c) prints "numnodes=<y> numvnod=N", N = <y>*<z>, to the logfile (LOGLEVEL >= 2)
> d) qstat shows <y> under the NDS and -- under the TSK columns
> e) creates PBS_NODEFILE containing N lines.
> 
> What is the reasoning behind the values of PBS_NODENUM and PBS_TASKNUM?
> They do not seem to contain any useful information. Furthermore, their
> numbers don't match the numbers from qstat.
> [another disclaimer: all my test were done using moab as scheduler, but
> I doubt that the results actually depend on the scheduler].

I haven't studied the patch, but I thought I'd shed some light on the
PBS_NODENUM and PBS_TASKNUM:

Below is an interactive job with 'nodes=3:ppn=2'.  As you can see, NODENUM
refers to the node which is executing a task, and TASKNUM refers to the
individual task.  These variables are only useful when executing processes
through the PBS "task manager" or tm interface.  Programs like mpiexec and
pbsdsh are examples.

[garrick at hpc0633 ~]$ echo $PBS_NODENUM $PBS_TASKNUM
0 1
[garrick at hpc0633 ~]$ pbsdsh -s sh -c 'echo `hostname` $PBS_NODENUM $PBS_TASKNUM'
hpc0633 0 2
hpc0633 0 3
hpc0632 1 4
hpc0632 1 5
hpc0631 2 6
hpc0631 2 7
[garrick at hpc0633 ~]$ pbsdsh -s sh -c 'echo `hostname` $PBS_NODENUM $PBS_TASKNUM'
hpc0633 0 8
hpc0633 0 9
hpc0632 1 10
hpc0632 1 11
hpc0631 2 12
hpc0631 2 13


-- 
Garrick Staples, Linux/HPCC Administrator
University of Southern California
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.supercluster.org/pipermail/torqueusers/attachments/20050716/a108fba8/attachment.bin


More information about the torqueusers mailing list