[slurm-users] Keep CPU Jobs Off GPU Nodes

Markus Kötter koetter at cispa.de
Wed Mar 29 09:01:16 UTC 2023


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

Markus Kötter, +49 681 870832434
30159 Hannover, Lange Laube 6
Helmholtz Center for Information Security
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5968 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20230329/7445d822/attachment.bin>

More information about the slurm-users mailing list