Hello,

On 29.03.23 10:08, René Sitt wrote:
While the cited procedure works great in general, it gets more complicated for heterogeneous setups , i.e. if you have several GPU types defined in gres.conf, since the 'tres_per_<x>' fields can then take the form of either 'gres:gpu:N' or 'gres:gpu:<type>:N' - depending on whether the job script specifies a GPU type or not.

Using lua match:

> for g in job_desc.gres:gmatch("[^,]*") do
>   count = g:match("gres:gpu:%w+:(%d+)$") or g:match("gres:gpu:(%d+)$")
>     if count then


MfG
--
Markus Kötter, +49 681 870832434
30159 Hannover, Lange Laube 6
Helmholtz Center for Information Security

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to