8

I have a job already submitted to a TORQUE queue. The system I submitted it on has several queues, and I want to change which queue I'm running it in. I found this question, which recommends the use of qalter, but qalter's man page doesn't have instructions for changing the queue.

EDIT: I tried qalter -q <queuename> <jobid> and I get an error message qalter: illegally formed job identifier: <queuename>

How can I change which queue a job is submitted to using a PBS system?

Dan
  • 3,355
  • 3
  • 21
  • 47

3 Answers3

8

I know this is an old question, but the correct command to move a queued job from one queue to another in torque is "qmove" and not qalter.

From man page:

Usage: qmove destination job_identifier ...

Description:

To move a job is to remove the job from the queue in which it resides and instantiate the job in another queue. The qmove command issues a Move Job batch request to the batch server that currently owns each job specified by job_identifier. A job in the running state cannot be moved by the user.

Yibo Yang
  • 103
  • 4
Glen
  • 236
  • 2
  • 3
7

The command

qalter -q <new queue name> <jobid>

should work for already submitted jobs. For new jobs use the same syntax with qsub

qsub -q <new queue name> <scriptname>

Please note that if your job is already running, the qalter will not make it switch queues. Only if the running job gets interrupted and restarted, it will switch queue.

GertVdE
  • 6,179
  • 1
  • 21
  • 36
  • This doesn't work on my machine. – Dan May 29 '13 at 21:37
  • Are the angle brackets part of the syntax of the qalter command? – Dan May 29 '13 at 21:42
  • 1
    @Dan: No, they are not. if you want to move the job with jobid 1234 to the queue named DansQueue, you should enter the command qalter -q DansQueue 1234. Make sure that you are allowed by your sysadmin to submit in that queue – GertVdE May 30 '13 at 06:50
6

In Torque only this works:

   qalter <jobid> -W queue=<new queue name>
user8028
  • 59
  • 1
  • 1