This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
wiki:managing_resources_cpu_gpu [2018/10/17 00:41] – [Managing processing unit topologies] neyron | wiki:managing_resources_cpu_gpu [2019/11/19 17:57] – [Second scenario, more complex] neyron | ||
---|---|---|---|
Line 69: | Line 69: | ||
Also, if some nodes do not have any GPU, you could set the value of the property for the corresponding resources to '' | Also, if some nodes do not have any GPU, you could set the value of the property for the corresponding resources to '' | ||
- | ===== Second scenario, more complexe | + | ===== Second scenario, more complex |
Lets assume now that you have a cluster of 3 nodes with 32 GB of RAM and per node: | Lets assume now that you have a cluster of 3 nodes with 32 GB of RAM and per node: | ||
* 2 CPUs of 6 cores each | * 2 CPUs of 6 cores each | ||
Line 167: | Line 167: | ||
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. | ||
+ | |||
+ | Finally, GPU jobs can be tied to GPU resources (where '' | ||
+ | <code perl> | ||
+ | foreach my $mold (@{$ref_resource_list}){ | ||
+ | foreach my $r (@{$mold-> | ||
+ | my $gpu_request = 0; | ||
+ | foreach my $resource (@{$r-> | ||
+ | if ($resource-> | ||
+ | $gpu_request = 1; | ||
+ | } | ||
+ | } | ||
+ | if ($gpu_request) { | ||
+ | if ($r-> | ||
+ | $r-> | ||
+ | }else{ | ||
+ | $r-> | ||
+ | } | ||
+ | print(" | ||
+ | } | ||
+ | } | ||
+ | } | ||
+ | </ | ||
Warning: make sure to look at lstopo output in order to correctly associate cpuset and gpudevices, e.g. not associating cores and GPUs not attached to a same CPU. | Warning: make sure to look at lstopo output in order to correctly associate cpuset and gpudevices, e.g. not associating cores and GPUs not attached to a same CPU. |