Mailing List Archives
Authenticated access
|
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [condor-users] requiring a project code to start a job
- Date: Fri, 07 May 2004 08:58:47 -0500
- From: Alain Roy <roy@xxxxxxxxxxx>
- Subject: Re: [condor-users] requiring a project code to start a job
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>