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

Re: [Condor-users] Classads aditional atributes



On Tue, 1 Feb 2005 11:48:41 +0100, Mário Costa <atritoman@xxxxxxxxx> wrote:
> I'm tring to add an atribute to a job, and I wore the folowing submit file
> 
> executable = time_loop
> universe = vanilla
> output = time_loop.output
> error = time_loop.error
> log = time_loop.log
> JOB_TOTAL_RUNNING_TIME = 5
> # initialdir = /tmp/condor
> arguments = 1
> should_transfer_files = YES
> when_to_transfer_output = ON_EXIT
> queue


that should be
+JOB_TOTAL_RUNNING_TIME = 5

note the plus
 
> Can any one tell me if, its legal the folowing START expretion,
> because since I have added it condor doesent find any more maches
> 
> # the max time for a job to run in minuts
> MAX_TOTAL_RUNNING_TIME = 15
> 
> START           = $(UWCS_START) && other.JOB_TOTAL_RUNNING_TIME <=
> $(MAX_TOTAL_RUNNING_TIME)

what is "other" do you mean "TARGET" ?

note that this will allow jobs which don't define
JOB_TOTAL_RUNNING_TIME to run since (assuming UWCS_START is true) this
evaluates as:

START  = $(UWCS_START) && TARGET.JOB_TOTAL_RUNNING_TIME <=
$(MAX_TOTAL_RUNNING_TIME)

START  = True && Undefined <= $(MAX_TOTAL_RUNNING_TIME)

START  = True && Undefined ( <= is strict)

START  = True   (&& is non strict)

this may or may not be your desired behaviour when the value is undefined...
 
> can I reference Classads atributes of a job in the START expretion ??

Indeed you can - just be careful if it is undefined - use guarded =?=
or =!= as appropriate.

A better way might be for your JOBS to define that they won't run on
machines which can only offer a max running time... there are
mechanisms such as max returement time in 6.7 series you could
reference directly or alternatively add to your exposed startd
requirements the JOB_MAX_RUN_TIME and then reference it in your
Requirements so:

Requirements = TARGET.JOB_MAX_RUN_TIME > X

(whatever X is)

again guarding against undefined ones...

Requirements = (TARGET.JOB_MAX_RUN_TIME =!= UNDEFINED &&
TARGET.JOB_MAX_RUN_TIME > X)

will only run on machines which inform you of their max run time and
it matches or

Requirements = (TARGET.JOB_MAX_RUN_TIME =?= UNDEFINED ||
TARGET.JOB_MAX_RUN_TIME > X)

wil run on any machine which doesn't specify it, or any that do
specify and are within the limits

Matt