We are using slurm 24.05.5, and on that and previous versions when you do sbatch and do not explicitly provide --account, it will use the defaultAccount field in the sacctmgr database.
Our Unix group and Slurm allocation names are not the same (groups have a two letter cluster name prefix, and allocations get a suffix indicating the source of the funding, and many users belong to multiple allocations with the same group). But you can test it; in particular, if you do "sacctmgr show user USERNAME" where USERNAME is some user on your system, it should list something like:
sacctmgr show user payerle User Def Acct Admin ---------- ---------- --------- payerle test-paid None
In this case, my default account is test-paid, and that will be used if I do not explicitly specify an account when submitting a job. (And we do not have a test-paid Unix group, and the closest unix group I belong to is zt-test).
Actually, the behavior you describe with the groups is new to me (although Google's AI also suggested something similar); I cannot find much in the docs to support either your or my description of Slurm behavior. All I know is that is how our Slurm behaves, and it has behaved that way in the ~10 years we have been using it. It is possible the behavior is dependent upon other configuration settings in Slurm (Slurm is like that),
However, in https://slurm.schedmd.com/sacctmgr.html, under Specifications for Users, it described the DefaultAccount field <quote> *DefaultAccount*=<*account*> https://slurm.schedmd.com/sacctmgr.html#OPT_DefaultAccountIdentify the default bank account name to be used for a job if none is specified at submission time. </quote>
I suggest you test it out; create a new account + group and user in the account; verify expected account defaulting when using sbatch, examine the defaultaccount for the user (sacctmgr show user), then change the name of the group w/out changing the defaultaccount and verify account defaulting works as expected.
On Thu, Jun 5, 2025 at 3:42 AM Bjørn-Helge Mevik via slurm-users < slurm-users@lists.schedmd.com> wrote:
"Burian, John via slurm-users" slurm-users@lists.schedmd.com writes:
My understanding is that in the absence of an --account option, sbatch/salloc assumes the account is the user’s primary POSIX group.
Are you sure about that? I've never heard of such defaulting. My understanding is that without --account, sbatch/salloc will use what has been set as the user's DefaultAccount in Slurmdbd. That can be set explicitly with sacctmgr first time a user is created, but failing that, the account of the first user-account association of the user will be used as DefaultAccount.
-- B/H
-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com