[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Condor-users] question about defining a special execute node



Hi Edwin,

On Wednesday, April 6, 2011 at 12:42 AM, Edwin Skidmore wrote:
Hello Condor experts,

This is most likely newbie question. Essentially, I would like to
configure an execute node that will used for one and only one type of
job (executable) and all other types of jobs should be rejected or not
matched to this node. What would be the best way to implement this?
Sure. There are a couple of ways to do this. The easiest way is with a custom attribute. You add to your jobs:

+SpecialJob = True

And then on machines that should only run special jobs you set START to be:

START = SpecialJob =?= True

That's the most straightforward way to accomplish what you're after.

If you wanted to do this without a custom attribute, and the Executable attribute on your jobs was something regular enough, you could try:

START = Execute =?= "/some/special/executable"

Can't say I've ever tried to do it that way before, but that's an avenue to explore if you don't want to have to to use a custom attribute.
Also, is there a way for a condor job to match to a node by determining
if an executable exists on a machine or is this best achieved by
defining a custom attribute?
A custom attribute is how you accomplish this. The machine would need to advertise, via it's ClassAd, that it has the software a job needs. Lets say we want sotware PackageA and it needs to be version >= 1.1. On a machine that has this software you'd do:

HAS_PackageA = True
PackageA_Version = 1.0
STARTD_ATTRS = $(STARTD_ATTRS), HAS_PackageA, PackageA_Version

That tells the machine to advertise the existence of PackageA and it's version in it's ClassAd.

On your job you'd say:

requirements = HAS_PackageA && PackageA_Version >= 1.0

And now you'd only run on the machine that has PackageA v1.0 or higher.

Regards,
- Ian

-- 
Ian Chesal
ichesal@xxxxxxxxxxxxxxxxxx