Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
wiki:managing_resources_cpu_gpu [2019/11/19 17:56] – [Second scenario, more complex] neyronwiki:managing_resources_cpu_gpu [2020/03/03 13:43] – [First scenario, simple] neyron
Line 11: Line 11:
 In database these 4 kinds of resource properties are all stored as **columns** of the ''resources'' table. A rows then gives the set of properties for one resource. In database these 4 kinds of resource properties are all stored as **columns** of the ''resources'' table. A rows then gives the set of properties for one resource.
  
-**Given a hierarchy** (chosen by the administrator for its cluster setup, for instance cluster/switch/host/cpu/core, but thread could be added, or other customizations), one row in the table gives information for the **lowest level of resources of the hierarchy** (e.g. core). Then **groups of lines** define higher levels, like Russian dolls (e.g. ''#C'' rows for CPUs, ''#H*#C'' rows for hosts, ...).+**Given a hierarchy** (chosen by the administrator for his cluster setup, for instance cluster/switch/host/cpu/core, but thread could be added, or other customizations), one row in the table gives information for the **lowest level of resources of the hierarchy** (e.g. core). Then **groups of lines** define higher levels, like Russian dolls (e.g. ''#C'' rows for CPUs, ''#H*#C'' rows for hosts, ...).
      
 One rule must be kept in mind: **any unique object in the resources hierarchy must have a unique id among its set of object**. For example: One rule must be kept in mind: **any unique object in the resources hierarchy must have a unique id among its set of object**. For example:
Line 68: Line 68:
  
 Also, if some nodes do not have any GPU, you could set the value of the property for the corresponding resources to ''gpudevice=-1'', and let the users add to the ''oarsub'' command a ''-p "gpudevice >=0"'' in order to get resources with GPUs. Also, if some nodes do not have any GPU, you could set the value of the property for the corresponding resources to ''gpudevice=-1'', and let the users add to the ''oarsub'' command a ''-p "gpudevice >=0"'' in order to get resources with GPUs.
 +
 +But be '''warned''', that the following commands will mostly not provide what a user would expect:
 +<code bash>
 +$ oarsub -l gpudevice=1 
 +</code>
 +will gives all resources matching one identifier of gpudevices, which means all nodes limited to their first gpus (''gpudevice=0''), or second gpus (''gpudevice=1''), or all nodes which have no gpus (''gpudevice=-1'').
 +
 +<code bash>
 +$ oarsub -l gpudevice=N
 +</code>
 +with N > 1 makes even less sense. See the setup proposed in the section below if you want to let your users request N gpus like that (using ''oarsub -l gpu=N'').
 +
 +
 +
 +
 +
  
 ===== Second scenario, more complex ===== ===== Second scenario, more complex =====
Line 168: Line 184:
 When reserving 1 GPU, the user obviously gets the 3 cores associated to the GPUs. When reserving 1 GPU, the user obviously gets the 3 cores associated to the GPUs.
  
-GPU job can be tied to GPU resources (where ''gpu > 0'') with the following admission rule (see ''oaradmissionrules''), so that users don't have to set ''-p "gpu > 0"'' in their command lines:+Finally, GPU jobs can be tied to GPU resources (where ''gpu > 0'') with the following admission rule (see ''oaradmissionrules''), so that users don't have to set ''-p "gpu > 0"'' in their command lines:
 <code perl> <code perl>
 foreach my $mold (@{$ref_resource_list}){ foreach my $mold (@{$ref_resource_list}){
wiki/managing_resources_cpu_gpu.txt · Last modified: 2020/03/03 14:10 by neyron
Recent changes RSS feed GNU Free Documentation License 1.3 Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki