scancel

scancel : used to signal jobs or job steps that are under the control of Slurm

The command scancel is used to signal or cancel jobs, job arrays or job steps . A job or job step can only be signaled by the owner of that job or user root. If an attempt is made by an unauthorized user to signal a job or job step, an error message will be printed and the job will not be signaled.

$ scancel <jobid>


JOBID PARTITION     NAME     USER ST       TIME  NODES NODELIST(REASON)
33416       all Hexadeca    fcruz  R    3:26:11      2 wn[131-132]
33434     debug  OFBuild  lmendes  R    1:50:42      1 wn069
33437       all       FE ngalamba  R      58:07      1 wn094
33439       all       FE ngalamba  R      29:43      1 wn097
33440       all       FE ngalamba  R      29:13      1 wn137
33441       all       FE ngalamba  R      13:43      1 wn126
33442       all       FE ngalamba  R       1:58      1 wn071
33443       all       FE ngalamba  R       1:41      1 wn071
33445       all       FE ngalamba  R       0:12      1 wn079

You can all your jobs (running and pending)

$ scancel --user <username>

You may also only cancel all your jobs in a specific element, i.e. state, partition...

$ scancel --state PENDING --user <username>

$ Job can be also canceled using the job name

$ scancel --name <jobname>

For more detailed information, please see man scancel