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

Re: [Condor-users] override user rank expression



On Tuesday, July 5, 2011 at 9:48 AM, Ian Chesal wrote:

On Friday, July 1, 2011 at 7:43 PM, Michael Di Domenico wrote:

Is there a mechanism in Condor that would allow condor to ignore a
rank _expression_ in a users submit file? I'd like to enforce that
every condor submit gets RANK=Target.Rank and ignores anything a user
might have submitted in his file
Unfortunately, no. There's an APPEND_RANK and DEFAULT_RANK setting -- the former appends to an existing RANK statement in a submission and the latter sets a default RANK if there isn't one in the submission. But there's nothing that lets you replace RANK outright.

This is a good case for submission wrappers: a layer of code between your users and Condor that you control. They give you the ability to control site-wide policies a little better when Condor doesn't the necessary mechanisms to enforce things for you. For example, in CycleServer we have the concept of "submission rules" that can be set for a site. These rules override anything a user might put in their submission file so site administrators can force things like a specific RANK statement on to every job.
I should answer questions before my morning coffee has kicked in. :)

Yes, you can do this! NEGOTIATOR_PRE_JOB_RANK is what you want to use. Jobs are sorted by this attribute before they are sorted by the user's RANK _expression_ in their job ad.

In your case:

NEGOTIATOR_PRE_JOB_ RANK = Rank

You may want to consider a way to keep the default RemoteOwner =?= UNDEFINED in that _expression_ -- so that your jobs prefer unoccupied slots first.

Manual page is here: http://www.cs.wisc.edu/condor/manual/v7.4/3_3Configuration.html#18503

Regards,
- Ian