TargetingNodes
From UF HPC Wiki
Introduction
This document describes how to target nodes with batch jobs in Torque.
Single Nodes
Normally, job scripts will have resource requests like #PBS -l nodes=1:ppn=2 or somesuch.
Sometimes it is useful to target N processors on a particular node (for example, reboot jobs). The following example will requests 4 procs on the node r4a-s42.ufhpc:
-bash-3.00$ qsub -l nodes=r4a-s42.ufhpc:ppn=4 testjob.job
4541814.torx.ufhpc
-bash-3.00$ qstat -u prescott -n
torx.ufhpc:
Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
-------------------- -------- -------- ---------- ------ ----- --- ------ ----- - -----
4541814.torx.ufhpc prescott investor testjob 22490 1 1 -- 00:01 R --
r4a-s42+r4a-s42+r4a-s42+r4a-s42
Multiple Nodes
Targeting multiple nodes with a single job is an extension of the single node syntax. This is useful to do on accasion, as well (benchmarking, for example). This example requests four procs on r4a-s42.ufhpc and another two on r3a-s18.ufhpc:
-bash-3.00$ qsub -l nodes=r4a-s42.ufhpc:ppn=4+r3a-s18.ufhpc:ppn=2 testjob.job
4541816.torx.ufhpc
-bash-3.00$ qstat -u prescott -n
torx.ufhpc:
Req'd Req'd Elap
Job ID Username Queue Jobname SessID NDS TSK Memory Time S Time
-------------------- -------- -------- ---------- ------ ----- --- ------ ----- - -----
4541819.torx.ufhpc prescott investor testjob -- 2 1 -- 00:01 R --
r4a-s42+r4a-s42+r4a-s42+r4a-s42+r3a-s18+r3a-s18
