[slurm-users] GrpTRES
Mahmood Naderan
mahmood.nt at gmail.com
Sat Mar 24 09:54:52 MDT 2018
First, if I just add a user to the linux system, then slurm will
automatically adds an account named "local". Is that right?
Then I set a limit for a user to use only one core and 1000M of memory. the
command is
[root at rocks7 mahmood]# sacctmgr modify user mahmood set
GrpTRES=cpu=1,mem=1000M
Modified user associations...
C = orca A = local U = mahmood
Would you like to commit changes? (You have 30 seconds to decide)
(N/y): y
[root at rocks7 mahmood]# sacctmgr show associations
format=cluster,account,user,grptres
Cluster Account User GrpTRES
---------- ---------- ---------- -------------
orca root
orca root root
orca local
orca local mahmood cpu=1,mem=10+
However, as I run a job with 2 cores, I see that the state is running!!
[mahmood at rocks7 ~]$ squeue
JOBID PARTITION NAME USER ST TIME NODES
NODELIST(REASON)
[mahmood at rocks7 ~]$ cat sl2.sh
#!/bin/bash
SBATCH --job-name = test
SBATCH --mem = 20M
SBATCH --ntasks = 2
SBATCH --output = test.txt
/share/apps/stress/bin/stress -c 2
[mahmood at rocks7 ~]$ sbatch sl2.sh
Submitted batch job 7
[mahmood at rocks7 ~]$ squeue
JOBID PARTITION NAME USER ST TIME NODES
NODELIST(REASON)
7 CLUSTER sl2.sh mahmood R 0:03 1
compute-0-0
[mahmood at rocks7 ~]$
I think something is wrong. Any idea?
Regards,
Mahmood
On Sat, Mar 24, 2018 at 5:31 PM, Chris Samuel <chris at csamuel.org> wrote:
> On Saturday, 24 March 2018 3:42:38 PM AEDT Mahmood Naderan wrote:
>
>> What do you mean by user and account?
>
> User = a user who has been created in Unix and then added to slurmdbd (the
> second part is essential)
> Account = A Slurm entity that can be thought of as a project or bank
account
> (the term used in the documentation).
>
>> Assume I have created a user
>> account (bob) with useradd command. I wan to set some limits for him.
>
> You also need to add the user to slurmdbd too!
>
>> The GrpTRES format is not clear for me. I assume that mem=200 is a
>> global 200MB of memory limit for all running jobs of bob. Therefore,
>> if bob is a running job with --mem=100MB, he will not be able to run a
>> second job with --mem=300MB. Is that right?
>
> That is my understanding. I've never used GrpTRES for a user, only on
> accounts.
>
>> I don't understand the 1500 value for cpu though. Is that the number of
>> cores?!
>
> Yes, that's - they can use no more than 1,500 CPU cores across the whole
> cluster.
>
> All the best,
> Chris
> --
> Chris Samuel : http://www.csamuel.org/ : Melbourne, VIC
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.schedmd.com/pipermail/slurm-users/attachments/20180324/6b0838d7/attachment-0001.html>
More information about the slurm-users
mailing list