On 06/17/2016 11:23 AM, Yuri wrote:

Hi I'm new to Slurm, how do I set a default maximum CPU and GPU limit
per user?

We use GrpCPUs if set on the user (not the account) it's a per user limit. We do similar with ram using GrpMEM. If you want a limit per user * partition we use a QoS with GrpMEM/GrpCPUs limits.

I've not tried limiting GPUs, I can see why you'd want to though.

Actually my goal is to set a maximum CPU/hour per user, in a way that
one user can use a maximum value calculated by (CPU*job_walltime).

No idea.  It CPU*Time is tracked though:
$ sreport user top Start=2015-07-21

Cluster Login Proper Name     Account          Used   Energy
------- ----- --------------- --------------- ------------- --------
hpc  user1    Bob Destruction  mathgrp    17536898898        0
hpc  user4    Steve Test       physicsgrp  2432346047        0
hpc  user3    Jane Entropy     geogrp       142683133        0
hpc  user2    Joe Random       enggrp        52373384        0

So it a script could query the used field (CPU*time) and then set GrpMEM/GRPCPU to zero and even kill jobs. There's probably a more elegant way to do this though.

Reply via email to