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

Re: [Condor-users] Error evaluating rank



Peter Myerscough-Jackopson wrote:
> 
> Bryan K. Wright wrote:
> > 
> > Hi folks,
> > 
> > 	I've been fiddling with the RANK expression in
> > condor_config.local, and I find that I'm getting errors of the form
> > "Error evaluating rank"
> > in StartLog when I use lines like the following:
> > 
> > OWNERBOOST = Owner == "user1" || Owner == "user2"
> > RANK = 10*( 2*OWNERBOOST - 1 ) - LoadAvg + 20
> > 
> > What's wrong with this syntax?  Also, is there any command-line tool for
> > checking the syntax of condor_config files?  (Like samba's
> > testparm.)
> 
> You might need to try this:
> 
> in case owner is undefined???
> 
> OWNERBOOST = Owner =?= "user1" || Owner =?= "user2"
> 
> Just a wild stab in the dark, but it means OWNERBOOST will always
> resolve to true or false, rather than true/false/undefined

Actually, I think "Owner" is always defined.

The problem is that symbols you define that otherwise have no meaning
to Condor are more like shell variables.  Try this:

OWNERBOOST = (Owner == "user1" || Owner == "user2")
RANK = 10 * ( 2 * $(OWNERBOOST) - 1 ) - LoadAvg + 20


The "$(<foo>)" syntax means to expand the variable "<foo>" in place.

-- 
Daniel K. Forrest	Laboratory for Molecular and
forrest@xxxxxxxxxxxxx	Computational Genomics
(608) 262 - 9479	University of Wisconsin, Madison