[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [condor-users] requiring a project code to start a job
- Date: Thu, 08 Jul 2004 03:06:47 -0500
- From: Derek Wright <wright@xxxxxxxxxxx>
- Subject: Re: [condor-users] requiring a project code to start a job
On Wed, 07 Jul 2004 17:10:06 -0500 "David A. Kotz" wrote:
> UTCS_START = ( (KeyboardIdle > $(StartIdleTime)) && \
> ( $(CPUIdle) || \
> (State != "Unclaimed" && State != "Owner")) && \
> $(ValidProject) && (TARGET.ProjectDescription) )
jamie's right about "!" not working in Condor's ClassAds. however,
that was only effecting your IsOwner expression, which doesn't have
any control over whether jobs start or not. the problem with your
jobs not starting is because of a problem in the above START
expression. you can't just use a string as a truth value like this:
> ... && $(ValidProject) && (TARGET.ProjectDescription) )
> +ProjectDescription = "simulating tribble navigation through turbolift system"
in your case, TARGET.ProjectDescription is a string, not a boolean.
so, when you try to evaluate it in this boolean expression, you're
getting a value of ERROR, which is treated as FALSE by the startd.
if you want to ensure that jobs define a ProjectDescription, you need
to use the "meta-not-equals" operator, "=!=", and verify that it's not
undefined. sorry for the double-negative, that's just the only good
way to do it in the current classad implementation:
(...) && $(ValidProject) && (TARGET.ProjectDescription =!= UNDEFINED)
given this, if ProjectDescription isn't in a job ClassAd, you'll get
(...) && (UNDEFINED =!= UNDEFINED)
and since UNDEFINED *is* UNDEFINED, this clause will become FALSE, and
the whole thing will be FALSE.
if there's a value, you'd get something like this:
(...) && ("doing real work" =!= UNDEFINED)
since the string "doing real work" is not UNDEFINED, this clause
remains TRUE and the rest of the expression can do its magic...
hope that all makes sense.
> The second problem with the above scenario is that the startd exits
> after complaining about a syntax error in evaluating the !UWCS_START
that's what jamie was talking about. ;)