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

Re: [condor-users] requiring a project code to start a job



Sorry to resurrect such an old thread, but for various reasons I've just
recently been able to implement this plan.  I've customized the
condor_config thusly:
________________________________________________

START = $(UTCS_START)

IsOwner = !UWCS_START

ValidProject =  ((TARGET.Project =?= "ARCHITECTURE") || \
                (TARGET.Project =?= "FORMAL_METHODS")|| \
                (TARGET.Project =?= "AI_ROBOTICS")   || \
                (TARGET.Project =?= "OPERATING_DISTRIBUTED_SYSTEMS")|| \
                (TARGET.Project =?= "NETWORKING_MULTIMEDIA")        || \
                (TARGET.Project =?= "PROGRAMMING_LANGUAGES")        || \
                (TARGET.Project =?= "THEORY")                       || \
                (TARGET.Project =?= "GRAPHICS_VISUALIZATION")       || \
                (TARGET.Project =?= "COMPONENT_BASED_SOFTWARE")     || \
                (TARGET.Project =?= "SCIENTIFIC_COMPUTING")         || \
                (TARGET.Project =?= "COMPUTATIONAL_BIOLOGY")        || \
                (TARGET.Project =?= "INSTRUCTIONAL")                || \
                (TARGET.Project =?= "OTHER"))

UTCS_START      = ( (KeyboardIdle > $(StartIdleTime)) && \
                        ( $(CPUIdle) || \
                        (State != "Unclaimed" && State != "Owner")) && \
                        $(ValidProject) && (TARGET.ProjectDescription) )

________________________________________________

Unfortunately, when users submit jobs with something like:

+Project = "AI_ROBOTICS"
+ProjectDescription = "simulating tribble navigation through turbolift
system"

in the submit description files, all of the machines refuse to start the
jobs.  If I change START back to UWCS_START and send a condor_reconfig
command, the jobs run just fine.  I've checked the job classads to
verify that Project and ProjectDescription are in them, and I've checked
the machine classads to make sure that they are checking the above
conditions.

The second problem with the above scenario is that the startd exits
after complaining about a syntax error in evaluating the !UWCS_START
expression.  I've tried it with !UWCS_START, !($UWCS_START),
and !($(UWCS_START)), and it doesnt like any of them.  This does not
effect the dedicated compute nodes in my clusters because I've set Owner
to FALSE on all of them, but I can't currently scavenge any cycles from
the desktop machines.

Have I done something silly, or is something strange happening?  Is it
the way I'm checking to make sure ProjectDescription has a value?

- dave


On Fri, 2004-05-07 at 08:58 -0500, Alain Roy wrote:
> >I was thinking of requiring something like this in the submit file:
> >
> >
> >      +Project = "validproject1"
> 
> I think that defining the project in the submit file and testing it in your 
> start expression is a fine way to go.
> 
> >and having a START expression like the following in the condor_config:
> >
> >
> >      START = ( (KeyboardIdle > $(StartIdleTime)) && \
> >              $(CPUIdle) || \
> >              (State != "Unclaimed" && State != "Owner") &&\
> >              ((TARGET.Project == validprject1) ||\
> >              (TARGET.Project == validproject2) ))
> >
> >
> >Will that reject jobs submitted without a project specified?
> 
> I have two comments. First, I would use a different subexpression:
> 
> (   (TARGET.Project =?= "validproject1")
>   || (TARGET.Project =?= "validproject2")
> )
> 
> The difference here is the use of =?= instead of ==. What's the difference? 
> Well, == does not give you true or false, it gives you true, false, or 
> undefined. You get undefined if TARGET.Project is not defined.
> 
> On the other hand, =?= will give you false if TARGET.Project is undefined.
> 
> You computer is in the owner state if IsOwner is true. By default, Condor 
> uses "IsOwner == !START". This expression is evaluated when there is no 
> job, so TARGET.Project will be undefined. Imagine the following scenario:
> 
> You stop working on the computer at time 0. Condor reevaluates START at 
> time 1. The keyboard has been idle for long enough for START to be true. 
> There is no job ClassAd, so TARGET.Project is undefined. START will be 
> FALSE, assuming you used =?= like I suggested. Therefore, IsOwner will be 
> true--you'll be in the owner state. START will not become true until the 
> keyboard and cpu have been idle for long enough, and you won't leave the 
> Owner state until they are.
> 
> To get the behavior you want, you may need to have an IsOwner expression 
> that isn't tied to the START expression.
> 
> >If so, how could I capture this project information for reporting?
> 
> Each condor_schedd stores the jobs that it has known about in a history 
> file. Look at the condor_history command to access this information. Notice 
> the constraint option to fetch just the jobs you want.
> 
> condor_history is not particularly fast, unfortunately.
> 
> -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>
-- 
David A. Kotz <dkotz@xxxxxxxxxxxxx>