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

Re: [HTCondor-users] Classifying job on the basis of cpu time request

Hi Todd
Thanks, both of your idea worked.


On Mon, Jun 22, 2015 at 5:34 PM, Todd Tannenbaum <tannenba@xxxxxxxxxxx> wrote:
On 6/22/2015 8:16 AM, mohammad kashif wrote:

I want to classify job on the basis of requested cputime and add a
JobType to the class add. I am adding request_cputime like this to job
submission script

Universe = vanilla
 Executable = hello_world.sh
input = /dev/null output = hello.out
error = hello.error
request_memory = 100
+request_cputime = 10

# configuration at SCHEDD

JobType = \
ifThenElse(request_cputime <= 2, "short",\
ifThenElse((request_cputime > 2) && (request_cputime <= 12), "medium",\
ifThenElse(request_cputime > 12, "long",\
ifThenElse(request_cputime =?= undefined, "long",\
 SUBMIT_EXPRS = $(SUBMIT_EXPRS) JobType request_cputime

It works if '+request_cputime' is defined in job submission script, but
I also want to make sure that if 'request_cputime' is not defined in the
job submission script then it should default to long. This bit is not
working. Any suggestion will be very helpful.


Just a quick guess, but I'd try making the comparison to UNDEFINED be the _first_ comparison you do in your nested ifThenElse expressions. What is likely happening is your first comparison above (request_cputime <= 2) is evaluating to undefined, which via short circuiting results in JobType going to undefined instead of long.

Another quick idea would be to put "request_cputime=24" in your condor_config, and also add request_cputime to the SUBMIT_EXPRS in your condor_config (looks like you alraedy did). This results in request_cputime in the job ad defaulting to 24 if the user does not specify it, which would be considered a long job.


HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: