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

Re: [condor-users] user group in RANK




For now, I have maybe 200 submission points.  I'm optimistically
thinking that my users will be pretty honest.  Besides, I have people
who will be happy to punish cheaters.

Dave,


Since you think that your users will be honest, this is not too hard, because Condor allows quite a bit of flexibility in how jobs are described.

Please forgive me if I give more detail than you need: I hope other people will find this answer useful too.

===== Basic solution

Recall that jobs and machines are described as ClassAds. A ClassAd is essentially a fancy name/value list. You can see the ClassAd for a job by doing:

condor_q -l [job-id]

Users can easily add anything they want to in their ClassAds. For instance, they can add the following line to their submit file:

+Group = "Physics"

After the job is submitted, you'll notice this line (without the plus) is in the job ClassAd. Please note that the quotes around "Physics" are essential.

Machines can look at any attribute they want. So your rank statement could look like this in your config file:

    Rank = ((TARGET.Group =?= "Physics") * 3)   \
         + ((TARGET.Group =?= "Chemistry") * 2) \
         + ((TARGET.Group =?= "CS") * 1)

(TARGET says "look in the other ClassAd".)

If someone specifies that they are in the Physics group, they will get a rank of three, which is better than any other rank.

You'll notice that I used =?= instead of ==. This is important, because the Group might be undefined if a user didn't put it into his submit file. If Group is undefined, then:

    Group =?= "Physics" is FALSE
    Group == "Physics" is UNDEFINED

For your Rank expression, we prefer to have it be FALSE. For ClassAds, when you treat TRUE and FALSE as numbers, you get 1 and 0 respectively, so when RANK is undefined your expression will give a RANK of 0. When you multiply with UNDEFINED, you get UNDEFINED.

===== Enhancement

If the folks in the Physics group always submit from the same computers and they don't share them with the folks from the Chemistry group, then you can have the Group set automatically. If the config file for a particular computer has:

    GROUP = "Physics"
    SUBMIT_EXPRS = GROUP

(Note the quotes around Physics and the lack of quotes around GROUP.)

then this is equivalent to adding it directly to the submit file with:

+Group = "Physics"

Note that if a user puts '+Group = "Chem"' in their submit file, it will override what you put into SUBMIT_EXPRS. This is not a mechanism ensure that users don't lie, it is a way to help users that may forget to add this.

===== Problems

Your users can lie or make mistakes. What can you do about it?

1) There is an undocumented mechanism for writing functions that can be put into your requirements or rank expression. You can write these functions in C++. This is an immature functionality, and it may slow down matchmaking. You can write a function that directly computes the rank based on the user's name. This is a bit more secure, but it's a lot more work.

2) Real support for groups may be in a future release of Condor.

-alain


Condor Support Information: http://www.cs.wisc.edu/condor/condor-support/ To Unsubscribe, send mail to majordomo@xxxxxxxxxxx with unsubscribe condor-users <your_email_address>