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

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



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