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

Re: [HTCondor-users] [HTCondor-Users] Queries related to classADs



Hi Collin,

Thanks for your detailed reply. I am trying to do something with PREEMPTION but it seems like that I am not doing justice with right variable substitution.

Added different attributes on two submit boxes which are submitting the jobs to same negotiator node.Â

submit1 $ condor_config_val -dump | grep teamname -i
SUBMIT_ATTRS = ÂCurrentWallTime Teamname
Teamname = "MC"
Â
submit2 $ condor_config_val -dump | grep Teamname
SUBMIT_ATTRS = ÂCurrentWallTime Teamname
Teamname = "Nomc"

Did this configuration in Master node. Still I am not sure when should I use $ or TARGET. Purpose of this configuration is to preempt any job running with job class ad nomc and for more than 180 seconds but this never worked for me.Â

CLAIM_WORKLIFE = 0
MAXJOBRETIREMENTTIME = 0
ALLOW_PSLOT_PREEMPTION = True
NEGOTIATOR_CONSIDER_PREEMPTION = True
PREEMPTION_REQUIREMENTS = True
PREEMPTION_REQUIREMENTS = ($(PREEMPTION_REQUIREMENTS) && ifthenelse(isundefined(TARGET.Currentwalltime), 0, TARGET.Currentwalltime) > 180 && tolower(TARGET.Teamname)) =?= "nomc")

This command output showing that right value is set:

$ condor_config_val -dump -negotiator PREEMPTION_REQUIREMENTS
PREEMPTION_REQUIREMENTS = (True && ifthenelse(isundefined(TARGET.Currentwalltime), 0, TARGET.Currentwalltime) > 180 && tolower(TARGET.Teamname) =?= "nomc")

Am I missing something in SYNTAX here if I remove the teamname part no luck. negotiator logs didn't show anything unusual infact they never showed whether PREEMPTION_REQUIREMENTS evaluated to FALSE or TRUE.

Version : 8.6.13

Thanks & Regards,
Vikrant Aggarwal


On Wed, May 29, 2019 at 10:44 PM Collin Mehring <collin.mehring@xxxxxxxxxxxxxx> wrote:
Hi Vikrant,

The configuration macros are per daemon, and only need to be defined on the machines running the corresponding daemon. You can see which daemon/tool a macro configures in the manual here.

Here's your list grouped by that:
condor_startd
CLAIM_WORKLIFE = 0
MAXJOBRETIREMENTTIME = 0
RANK = 0.0

condor_submit
CurrentWallTime = ifthenelse(JobStatus==2,CurrentTime-EnteredCurrentStatus,0)
SUBMIT_ATTRS = $(SUBMIT_ATTRS) CurrentWallTime

condor_negotiator
ALLOW_PSLOT_PREEMPTION = True
PREEMPTION_REQUIREMENTS = True
NEGOTIATOR_CONSIDER_PREEMPTION = True
PREEMPTION_RANK = TARGET.CurrentWallTime

For the second part of your question, I think PREEMPTION_RANK references the job attributes first and would therefor just be = CurrentWallTime. However, CurrentWallTime is a custom attribute you're adding and is likely to be undefined for at least some jobs in your pool. You can handle that case however you'd like, but it should use a default at minimum. (e.g. PREEMPTION_RANK = CurrentWallTime ?: 0)

On Wed, May 29, 2019 at 3:00 AM Vikrant Aggarwal <ervikrant06@xxxxxxxxx> wrote:
Hello Condor Experts,

I have doubts regarding the usage of class ads after reading [1]

- Three type of nodes are present in HTCondor setup 1) Submitter 2) Master 3) Worker node. For job matching job and worker machine classads are used.

Taking an example to express my confusion here:

- While setting up a basic preemption policy referring [2] I came up with following conf (which is not working for me). I was not sure on which node I should create this file hence I created on all nodes. I haven't used "$" to evaulate "EnteredCurrentStatus", CurrentWallTime I believe it's automatic picking the value for it however for SUBMIT_EXPR while adding CurrentWallTime in it I referred the existing value of variable as $(SUBMIT_ATTRS). I refer this _expression_ from existing working configuration, I can't get when we refer the variable using $ and when not.

$ cat /etc/condor/config.d/50-vaggarwal
CLAIM_WORKLIFE = 0
MAXJOBRETIREMENTTIME = 0
CurrentWallTime = ifthenelse(JobStatus==2,CurrentTime-EnteredCurrentStatus,0)
SUBMIT_ATTRS = $(SUBMIT_ATTRS) CurrentWallTime
ALLOW_PSLOT_PREEMPTION = True
PREEMPTION_REQUIREMENTS = True
NEGOTIATOR_CONSIDER_PREEMPTION = True
RANK = 0.0
PREEMPTION_RANK = $(CurrentWallTime)

- As per guide [1], if I am putting the same above configuration on master node this should not work because I am referring CurrentWallTime from job Class Ad hence I appended PREEMPTION_RANK with TARGET to get the value of CurrentWallTime from job classad (unfortunately this also doesn't help me with pre-emption scenario). is this a right approach? if yes, then should I do the same on worker node also or the job is running on worker node hence it should be automatically able to pick the value of CurrentWallTime without referring it using TARGET?

CLAIM_WORKLIFE = 0
MAXJOBRETIREMENTTIME = 0
CurrentWallTime = ifthenelse(JobStatus==2,CurrentTime-EnteredCurrentStatus,0)
SUBMIT_ATTRS = $(SUBMIT_ATTRS) CurrentWallTime
ALLOW_PSLOT_PREEMPTION = True
PREEMPTION_REQUIREMENTS = True
NEGOTIATOR_CONSIDER_PREEMPTION = True
RANK = 0.0
PREEMPTION_RANK = TARGET.CurrentWallTime

- Don't we have any way to refer the classad types of other services like schedd, negotiator in the Machine or job classADs?


[1] https://research.cs.wisc.edu/htcondor/manual/v8.5/4_1HTCondor_s_ClassAd.html#SECTION00511100000000000000
[2] http://erikerlandson.github.io/blog/2012/07/19/lifo-and-fifo-preemption-policies-for-a-condor-pool/

Thanks & Regards,
Vikrant Aggarwal
_______________________________________________
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/


--
Collin Mehring | PE-JoSE - Software Engineer

_______________________________________________
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/