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

Re: [Condor-users] How to view computed rank?



On Oct 15, 2005, at 4:32 PM, Finch, Ralph wrote:

Owner should be the 'Owner' attribute in the job ad (viewable
with condor_q -l). Have you configured all of your machines
to advertise this 'MachineOwner' attribute your expression uses?


Yes. Finally figured out that 'Owner' is simply the login name.

But it doesn't show up in condor_status. Is this because 'Owner' is
only created when a job is submitted, to show ownership of the submitted
job?

The Owner attribute only appears in job ads, and shows the user who submitted the job.


In fact nor do my locally created attributes appear.  For example, in
the
condor_config file I have

# set up ranking:
# higher preference to job submitter's machine
SelfMachine = (10 * (Owner == $(MachineOwner)))
# Current Virtual Machine load
VMLoad = LoadAvg
# redefine keyboard busy to be within 90 minutes
KeyboardBusy = (KeyboardIdle < 1.5 * 60 * $(MINUTE))
# Don't want to use both VMs if keyboard is busy; don't use 1st VM
MachineBusy = (3 * ($(KeyboardBusy) && (VirtualMachineID == 1)))
# Machine ranking
RANK = $(SelfMachine) - $(VMLoad) - $(MachineBusy) + 5.0

but only 'RANK' appears; because it is defined by the condor system?

Adding extra attributes in the config file doesn't make them appear in the machine ad. You have to use STARTD_EXPRS to tell Condor what extra attributes to include. You don't need to include the extra attributes for RANK to work though, because you're using config file substitution to build the expression. As you see, the final result in the machine ad is this:


Rank = (10 * (Owner == "rfinch")) - LoadAvg - (3 * ((KeyboardIdle < 1.500000 * 60 * 60) && (VirtualMachineID == 1))) + 5.000000

Another option would be to include the extra attributes in the machine ad and have Rank refer to them in the ad. You would set your config file like this:

MachineOwner = "rfinch"
SelfMachine = (10 * (Owner == MachineOwner))
# Current Virtual Machine load
VMLoad = LoadAvg
# redefine keyboard busy to be within 90 minutes
KeyboardBusy = (KeyboardIdle < 1.5 * 60 * $(MINUTE))
# Don't want to use both VMs if keyboard is busy; don't use 1st VM
MachineBusy = (3 * ($(KeyboardBusy) && (VirtualMachineID == 1)))
# Machine ranking
RANK = SelfMachine - VMLoad - MachineBusy + 5.0
# Inlcude the extra attributes in the machine ad
STARTD_EXPRS = $ (STARTD_EXPRS),MachineOwner,SelfMachine,VMLoad,MachineBusy


Then the machine would have these attributes:

MachineOwner = "rfinch"
SelfMachine = (10 * (Owner == MachineOwner))
VMLoad = LoadAvg
MachineBusy = (3 * ((KeyboardIdle < 1.5 * 60 * 60) && (VirtualMachineID == 1)))
Rank = SelfMachine - VMLoad - MachineBusy + 5.0


So, when constructing expressions that will appear in the machine ad, you can have the attribute references resolved when the config file is read (by using the $(...) notation) or in the machine ad itself. In the latter case, you have to ensure that the attributes make it into the ad.

+----------------------------------+---------------------------------+
|            Jaime Frey            |  Public Split on Whether        |
|        jfrey@xxxxxxxxxxx         |  Bush Is a Divider              |
|  http://www.cs.wisc.edu/~jfrey/  |         -- CNN Scrolling Banner |
+----------------------------------+---------------------------------+