Overview



There are times when it is necessary to attach a particular resource to a host or group of hosts. Then, when submitting a job, this resource can be requested and only those hosts that are tagged with this resource will be candidates for running the job. A good example of this is a node-locked license.

The following steps outline the procedure to attach a resource to a host using Qmon.

1) Define the resource

In the main qmon window, click "Complexes Configuration". Highlight host in the lefthand box. A list of built-in resources appears in the main window. Click "Modify". In the next screen, the resource needs to be defined. For example:

#Name   Shortcut Type   Value   Relation Requestable Consumable Default
#------------------------------------------------------------------------
build   build    bool   false   ==       YES         NO         0

  Name: The name of this resource
  Shortcut: Each resource may have a unique shortcut assigned to it
  Type: The type of resource (boolean, integer, char, etc)
  Value: The default value for this resource
  Relation: == since a boolean value.
  Requestable: Allow users to request the resource
  Consumable: This resource is not consumed when requested
  Default: Not used


After adding the resource, be sure to click "Add" to add the new resource to the table below. Then click "Ok".

2) Attach the resource to specific hosts

In the main qmon window, click "Host Configuration". Click on the "Execution Host" tab. Highlight the host that the resource should be attached to, and click "Modify".

Click on "Name" on the right-side of the window. A list of available resources appears. Choose or type in the new resource and click "OK". Type in 'true' for the "Value".

3) Request the resource

Any job submitted requesting this resource will be scheduled on the hosts specified in the above step. To request the resource, use the -l switch:

qsub -l build=true myjob.sh

note: '-l build' is equivalent to '-l build=true'