
我想將 Slurm 作業排程系統中的使用者從目前群組移至其他群組。但是當我嘗試顯而易見的事情時出現錯誤:
sacctmgr modify user where name=example set account=groupb
我得到的唯一方法是刪除它並使用新帳戶重新建立:
sacctmgr delete user example account=groupa
sacctmgr add user example account=groupb
謝謝
答案1
我找到了另一種方法,使用多個帳戶並將預設帳戶設定為最後新增的帳戶:
sacctmgr add user example account=groupb
sacctmgr modify user where user=example set defaultaccount=groupb
答案2
我想到了這個答案,並想在這裡分享我的見解:在 Slurm 中,一切都以關聯為中心。鄭老師的回答絕對正確。只需為該用戶新增一個關聯並刪除舊關聯即可。或甚至保留舊的關聯,以便使用者可以決定在哪個帳戶下執行作業(請參閱 srun 的 -U 選項)
sacctmgr remove user where user=example and account=oldgroup
sacctmgr add user name=example defaultaccount=newgroup ...