Use qdel to delete all my jobs at once, not one at

2019-03-08 02:05发布

This is a rather simple question but I haven't been able to find an answer.

I have a large number of jobs running in a cluster (>20) and I'd like to delete them all and start over.

According to this site I should be able to just do:

qdel -u netid

to get rid of them all, but in my case that returns:

qdel: invalid option -- 'u'
usage: qdel [{ -a | -c | -p | -t | -W delay | -m message}] [<JOBID>[<JOBID>]|'all'|'ALL']...
   -a -c, -m, -p, -t, and -W are mutually exclusive

which obviously indicates that the command does not work.

Just to check, I did:

qstat -u <username>

and I do get a list of all my jobs, but:

qdel -u <username>

also fails.

9条回答
一夜七次
2楼-- · 2019-03-08 02:28

sometimes a simple grep/cut can help too: qstat | grep $USER | cut -d. -f1 | xargs qdel

This way we can also grep on a particular keyword for the jobs and delete them.

HTH

查看更多
在下西门庆
3楼-- · 2019-03-08 02:30

For UGE:

qstat -u | gawk '{print $1}' | xargs qdel

查看更多
Summer. ? 凉城
4楼-- · 2019-03-08 02:32

Another possibility is to do qdel all. It deletes all jobs from everyone. When you don't have access for other people's job, it deletes only your jobs.

It is not the most beautiful solution, but it is surely the shortest!

查看更多
登录 后发表回答