如何在 Slurm 中修改用户关联?

Zhe*_*hen 6 job-scheduler user-accounts

我想将 Slurm 作业调度系统中的用户从当前组移动到其他组。但是当我尝试显而易见的事情时出现错误:

sacctmgr modify user where name=example set account=groupb
Run Code Online (Sandbox Code Playgroud)

我得到的唯一方法是删除它并使用新帐户重新创建:

sacctmgr delete user example account=groupa
sacctmgr add user example account=groupb
Run Code Online (Sandbox Code Playgroud)

谢谢

Zhe*_*hen 9

我找到了另一种使用多个帐户并将默认帐户设置为最后一个添加的方法:

sacctmgr add user example account=groupb
sacctmgr modify user where user=example set defaultaccount=groupb
Run Code Online (Sandbox Code Playgroud)


Pla*_*Tag 8

我想到了这个答案,并想在这里分享我的见解:在 Slurm 中,一切都以关联为中心。甄的回答完全正确。只需为该用户添加一个新关联并删除旧关联。或者甚至离开旧关联,以便用户可以决定在哪个帐户下运行作业(请参阅 srun 的 -U 选项)

sacctmgr remove user where user=example and account=oldgroup
sacctmgr add user name=example defaultaccount=newgroup ...
Run Code Online (Sandbox Code Playgroud)