Coordinating a Slurm Account

On the clusters the YCRC maintains, we map your linux user and group to your slurm user and account, which is what actually gives you permission to submit to the various partitions available on the clusters. By changing the slurm accounts associated with your user, you can modify access to partitions. As a coordinator of an account, you have permission to modify users' association with that account and modify jobs running that are associated with that account. Below are some useful example commands where we use an example user with the name "be59" where you are the coordinator of the slurm account "cryoem".

Add/Remove users from account

sacctmgr add user be59 account=cryoem # add user
sacctmgr remove user where user=be59 and account=cryoem # remove user

Show account info

sacctmgr show assoc user=be59 # show user associations
sacctmgr show assoc account=cryoem # show assocations for account

Submit jobs

srun -A cryoem ...
sbatch -A cryoem

List jobs

squeue -A cryoem  # by account
squeue -u  # by user

Cancel Jobs

scancel 1234  # by job ID
scancel -u be59   # kill all jobs by user
scancel -u be59 --state=running  # kill running jobs by user
scancel -u be59 --state=pending  # kill pending jobs by user
scancel -A cryoem  # kill all jobs in the account