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.On 6/22/2015 8:16 AM, mohammad kashif wrote:
Hi
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",\
 "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.
Thanks
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.
regards,
Todd
_______________________________________________
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting
https://lists.cs.wisc.edu/mailman/listinfo/htcondor-users
The archives can be found at:
https://lists.cs.wisc.edu/archive/htcondor-users/