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 [2019/06/25 14:25] – [Second scenario, more complexe] neyron | wiki:managing_resources_cpu_gpu [2019/11/19 17:57] – [Second scenario, more complex] neyron | ||
---|---|---|---|
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. |