<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Arial; font-size: 12pt; color: #000000'><br>Micha Feigin wrote:<br><br>&gt;The problem:<br>&gt;<br>&gt;I want to allow gpu related jobs to run only on the gpu<div>&gt;equiped nodes (i.e more jobs then GPUs will be queued),</div><div>&gt;I want to run other jobs on all nodes with either:</div><div>&gt;<br>&gt; &nbsp;1. a priority to use the gpu equiped nodes last<br>&gt; &nbsp;2. or better, use only two out of four cores on the gpu equiped nodes</div><div><br></div><div>In PBS Pro you would do the following (torque may have something</div><div>similar):</div><div><br></div><div>1. &nbsp;Create a custom resource called "ngpus" in the resourcedef</div><div>&nbsp;&nbsp; &nbsp; &nbsp;file as in:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ngpus<span class="Apple-tab-span" style="white-space:pre">        </span>type=long<span class="Apple-tab-span" style="white-space:pre">        </span>flag=nh</div><div><br></div><div>2. &nbsp;This resource should then be explicitly set on each node that</div><div>&nbsp;&nbsp; &nbsp; &nbsp;includes a GPU to the number it includes:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;set node compute-0-5 resources_available.ncpus = 8</div><div>&nbsp;&nbsp; &nbsp; &nbsp; set node compute-0-5 resources_available.ngpus = 2</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;Here I have set the number of cpus per node (8) explicitly to defeat</div><div>&nbsp;&nbsp; &nbsp; &nbsp;hyper-threading&nbsp;and the actual number of gpus per node (2). &nbsp;On the&nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;other nodes you might have:</div><div><br></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; set node compute-0-5 resources_available.ncpus = 8</div><div>&nbsp;&nbsp; &nbsp; &nbsp; set node compute-0-5 resources_available.ngpus = 0</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp; Indicating that there are no gpus to allocate.</div></div><div><br></div><div>3. &nbsp;You would then use the '-l select' option in your job file as follows:</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;#PBS &nbsp;-l select=4:ncpus=2:ngpus=2</div><div><br></div><div>&nbsp;&nbsp; &nbsp; &nbsp;This requests 4 PBS resource chunks. &nbsp;Each includes 2 cpus and 2 gpus.</div><div>&nbsp;&nbsp; &nbsp; &nbsp;Because the resource request is "chunked" these 2 cpu x 2 gpu chunks would</div><div>&nbsp;&nbsp; &nbsp; &nbsp;be placed together on one physical node. &nbsp;Because you marked some&nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;nodes as having 2 gpus in the nodes file and some to have&nbsp;0 gpus, only those</div><div>&nbsp;&nbsp; &nbsp; &nbsp;that have them will get allocated. &nbsp;As a consumable resource, as soon as 2</div><div>&nbsp;&nbsp; &nbsp; &nbsp;were allocated the total available would drop to 0. &nbsp; In total&nbsp;you would have</div><div>&nbsp;&nbsp; &nbsp; &nbsp;asked for 4 chunks distributed to&nbsp;4 physical nodes (because&nbsp;only one of these</div><div>&nbsp;&nbsp; &nbsp; &nbsp;chunks can fit on a single node). &nbsp;This also ensures a 1:1 mapping of cpus to&nbsp;</div><div>&nbsp;&nbsp; &nbsp; &nbsp;gpus, although it does nothing about tying each cpu to a different socket. You</div><div>&nbsp;&nbsp; &nbsp; &nbsp;would to do that in the script with numactl probably.</div><div><br></div><div>There are other ways to approach by tying physical nodes to queues, which you</div><div>might wish to do to set up a dedicate slice for GPU development. &nbsp;You may also</div><div>be able to do this in PBS using the v-node abstraction. &nbsp;There might be some&nbsp;</div><div>reason to have two production routing &nbsp;queues that map to slight different parts</div><div>of the system.</div><div><br></div><div>Not sure how this could be approximated in Torque, but perhaps this will give you</div><div>some leads.</div><div><br></div><div>rbw</div><div>_______________________________________________<br>Beowulf mailing list, Beowulf@beowulf.org sponsored by Penguin Computing<br>To change your subscription (digest mode or unsubscribe) visit http://www.beowulf.org/mailman/listinfo/beowulf<br></div></div></body></html>