Example Limiting where a Job runs

Condor has a flexible mechanism to specify requirements for a job. In a condor submit file you can add arbitrary restrictions using the requirements option. For example you can restrict a job to run on a specific machine with something like:

requirements = (Machine == "")

The requirements field is a boolean expression that can be joined with && (and) and || (or), so if you wanted to do two machines you should be able to do:

requirements = ((Machine == "")||(Machine == ""))

Because the requirements field is added to other filters generated by Condor its usually a good idea to parenthesize your expression.

Test Expressions

You can discover what variables are exported by a host by doing condor_status -long <hostname>

You can test your requirements expression to make sure its limited to the systems your interested in by doing:

condor_status -constraint "(expression)"

(for example)

condor_status -constraint '(Machine == "")'

WoldlabWiki: Condor/Requirements (last edited 2014-07-15 21:54:39 by diane)