Mailing List Archives
	Authenticated access
	
	
     | 
    
	 
	 
     | 
    
	
	 
     | 
  
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [HTCondor-users] Setting preemption based on submit boxes
- Date: Fri, 31 May 2019 10:15:23 -0500 (CDT)
 
- From: Todd L Miller <tlmiller@xxxxxxxxxxx>
 
- Subject: Re: [HTCondor-users] Setting preemption based on submit boxes
 
MAXJOBRUNTIME=24 * $(HOUR)
RANK = ifthenelse($(teamname), ifthenelse($(teamname) == "MC", $(teamname)
* 10, 0), 0)
	RANK is a ClassAd expression.  A $(substitution) will use values 
from the configuration file as it was at configuration time, not from the 
ClassAd(s) in question.  So:
RANK = ifthenelse( teamname =?= "MC", 1000, 0 )
will set the rank to 1000 if the teamname is equal to MC, and 0 otherwise 
(including if teamname is undefined).  Since each MC job has the same rank
as every other MC job, and a rank higher than everything else, I believe 
that will prevent rank-based preemption.
PREEMPTION_REQUIREMENT = ifthenelse($teamname != "MC", totaljobruntime > 2
* $(HOUR), 0)
	Likewise:
PREEMPTION_REQUIREMENTS = ifthenelse(teamname =?= "MC", false, $(AFTER_TWO_HOURS) )
will prevent a job marked as MC from being preempted by user priority, and
allow it if AFTER_TWO_HOURS is true.
	I don't know off the top of my head how to write AFTER_TWO_HOURS.
  1. MC jobs are never preempted.
  2. MC jobs preempt any other team's job after N hours.
  3. Otherwise, jobs are allowed to run until the pool maximum of 24 hours.
Would above logic make sense according to requirement?
	There's no 'N' in the RANK expression you provided.
- ToddM