[slurm-users] sacctmgr - bug listing accounts?
Loris Bennett
loris.bennett at fu-berlin.de
Mon Apr 30 06:56:49 MDT 2018
Hi Ole,
Ole Holm Nielsen <Ole.H.Nielsen at fysik.dtu.dk> writes:
> Hi Loris,
>
> On 04/30/2018 01:09 PM, Loris Bennett wrote:
>> Your example of how to use 'Organisation' to setup separate groups
>> within one department is illuminating. However, I am still unable to
>> set up 'geochemie' as a sibling of 'geophysik' and a child of 'geowiss':
>>
>> $ sacctmgr list acc where account=geophysik
>> Account Descr Org
>> ---------- -------------------- --------------------
>> geophysik geophysik geowiss
>> $ sacctmgr list acc where account=geochemie
>> Account Descr Org
>> ---------- -------------------- --------------------
>> $ sacctmgr add acc geochemie Description="Geochemie" Parent=geowiss Organization=geochemie
>> No associations created.
>> $ sacctmgr list acc where account=geochemie
>> Account Descr Org
>> ---------- -------------------- --------------------
>>
>> So how do I get sacctmgr to show 'geochemie'? The dump created by
>> 'sacctmgr' indicated that 'geochemie' exists and is a child of
>> 'geowiss':
>>
>> Parent - 'geowiss'
>> Account - 'geochemie':Fairshare=2
>> Account - 'geographie':Description='geographie':Organization='geowiss':Fairshare=1
>> Account - 'geologie':Description='geologie':Organization='geowiss':Fairshare=4
>> Account - 'geophysik':Description='geophysik':Organization='geowiss':Fairshare=3
>> Account - 'meteorologie':Description='meteorologie':Organization='geowiss':Fairshare=20
>>
>> This is borne out by the contents of the database:
>> mysql> select user,acct,id_assoc,parent_acct from soroban_assoc_table where acct like 'geo%';
>> +------+------------+----------+-------------+
>> | user | acct | id_assoc | parent_acct |
>> +------+------------+----------+-------------+
>> | | geochemie | 909 | geowiss |
>> | | geographie | 163 | geowiss |
>> | | geologie | 223 | geowiss |
>> | | geophysik | 296 | geowiss |
>> | | geowiss | 56 | root |
>> +------+------------+----------+-------------+
>>
>> So this looks like a bug to me.
>
> Let's first check your account hierarchy: The command:
>
> /usr/bin/sacctmgr -sor show accounts
>
> will print the hierarchy for you. The output may look confusing, so I
> recommend you to run my tool "slurmaccounts2conf" which you will find
> at
> https://github.com/OleHolmNielsen/Slurm_tools/tree/master/slurmaccounts. You
> don't have to copy my account setup, but the tools can still be
> useful.
>
> As a reference, slurmaccounts2conf prints our account hierarchy like this:
>
> ###
> ### Slurm accounts for cluster niflheim
> ###
> ### Syntax of the file is:
> ### account:parent:FairShare:Description
> ###
> ### Parent account root->external
> external:root:parent:external groups
> qwise:external:parent:quantumwise
> qwisegst:external:parent:quantumwise guests
> topsoe:external:parent:haldor topsoe
> ###
> ### Parent account root->external->ku_kemi
> ku_kemi:external:parent:ku kemi
> chemku:ku_kemi:parent:ku kemi
> ###
> ### Parent account root->dtu
> dtu:root:parent:dtu departments
> ###
> ### Parent account root->dtu->energy
> energy:dtu:parent:dtu energy
> ###
> ### Parent account root->dtu->energy->batteries
> batteries:energy:parent:batteries section
> ecsvip:batteries:parent:batteries vip
> ecsguest:batteries:parent:batteries guests
> ecsfac:batteries:parent:batteries faculty
> ecsstud:batteries:parent:batteries students
> ...
Unfortunately sacctmgr just doesn't list 'geochemie' as being an
account. It only appears as the parent of the research groups which are
below it in the hierarchy:
$ /usr/bin/sacctmgr -or show accounts | egrep 'geo|Acc|---'
Account Descr Org
---------- -------------------- --------------------
agalpha agalpha geochemie
agbravo agbravo geophysik
agcharlie agcharlie geologie
agdelta agdelta geographie
agecho agecho geologie
agfoxtrot agfoxtrot geographie
geographie geographie geowiss
geologie geologie geowiss
geophysik geophysik geowiss
geowiss geowiss root
meteorolo+ meteorologie geowiss
It doesn't appear as a child of 'geowiss'. It does however turn up in
the list of associations:
$ /usr/bin/sacctmgr -or show assoc format=account | egrep 'geo|Acc|---'
Account
----------
geowiss
geochemie
geographie
geologie
geophysik
So maybe I am suffering from some confusion regarding accounts and
associations.
Cheers,
Loris
PS: I tried your script, but it also has a problem with gawk3/4:
$ ./slurmaccounts2conf
awk: cmd. line:13: for (c in children[a]) {
awk: cmd. line:13: ^ syntax error
awk: cmd. line:16: for (c in children[a]) {
awk: cmd. line:16: ^ syntax error
awk: cmd. line:30: children[$5][$1] = $1
awk: cmd. line:30: ^ syntax error
However, I think the functionality of your script may overlap with that of
sacctmgr dump <cluster name>
--
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin Email loris.bennett at fu-berlin.de
More information about the slurm-users
mailing list