Using SGE I can exclude a node called "node6" with the option:

#$ -l h=!node6

Question: Does anyone know how to extend this to more than one node? I really can't find a good HowTo and I'm tired of guessing. Thanks!

有帮助吗?

解决方案

You can use a wildcard expression to exclude some nodes. For example if you have nodes called node1, node2 ... nodeX; to exclude node2 to node5 you can use :

 #$ -l h='!node[2-5]'

or to exclude several nodes :

 #$ -l h='!(nodeP|nodeQ|...|nodeR)' //P,Q,R in [1,X]

Now just find the pattern which matches all the nodes you want to exclude.

Else, you can use a resource quota. To perform that, create a resource quota :

qconf -arqs disabledHostsResourceQuota

Edit this resource quota to allow a hostgroup (let's call it disabledHosts) to prevent jobs from running :

{
   name         disabledHostsResourceQuota
   description  resource quota to disable some hosts
   enabled      TRUE
   limit        hosts {@disabledHosts} to slots=0
}

Then create your hostgroup :

qconf -ahgrp  disabledHosts

and in the "hostlist" field, add all the hosts you want to disable. You can then submit your job without any option, that should do the trick.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top