excluding nodes from qsub command under sge

Yotam picture Yotam · Dec 13, 2012 · Viewed 13.6k times · Source

I have more than 200 jobs I need to submit to and sge cluster. I'll be submitting them into two ques. One of the ques have a machine that I don't want to submit jobs to. How can I exclude that machine? The only thing I found that might be helpful is (assuming three valid nodes available to q1 and all the available nodes for q2 are valid):

qsub -q q1.q@n1 q1.q@n2 q1.q@n3 q2.q

Answer

William Hay picture William Hay · Oct 17, 2013

Assuming you don't want to run it on is called n4 then adding the following to your script should work.

#$ -l h=!n4

If you add the -l option to the qsub command line rather than embedding it in the submitted script most shells would require the exclamation mark to be quoted.