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

Re: [HTCondor-users] Counting job num of holds for a given reason



Thanks Todd. I wasnât thinking about using MemoryUsage but instead trying to work with NumSystemHolds and NumJobStarts. I think your approach will work and let me do the periodic release exactly once.

_____________________________________________
Parag Mhashilkar
 
Fermi National Accelerator Laboratory
WWW: www.fnal.gov
Phone: 1 (630) 840-6530
Fax: 1 (630) 840-3109
_____________________________________________

On 1/19/18, 1:00 PM, "HTCondor-users on behalf of Todd Tannenbaum" <htcondor-users-bounces@xxxxxxxxxxx on behalf of tannenba@xxxxxxxxxxx> wrote:

    
    > Hi,
    > 
    > I want to set a periodic release for a job in case the job is held with 
    > code 34 only so I can request more memory next time when it is released. 
    > However, I want the periodic_release to be triggered only once for these 
    > set of jobs. I got most of the logic figured out, but am missing on how 
    > to put the counter in place for number of times the job was held with 
    > holdcode 34. Is there a macro or standard job classad attribute I am 
    > missing?
    > 
    
    No easy way to have a counter like you ask above, but I think you could still achieve the policy you want (only increase the memory once).  How about a submit file like the following?  I didn't test it, but I think it will demonstrate the gist of what you want.  The trick it to record the initial memory request in the ad, and then compare the current memory request to the initial request to decide when to stop releasing the job instead of relying on a (non-existent) counter.
    
      executable = foo.exe
      +initial_memory = 256
      request_memory = ifthenelse(isUndefined(MemoryUsage),initial_memory,2*MemoryUsage)
      periodic_release = (HoldReasonCode =?= 34) && (request_memory < (2 * initial_memory))
      
    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/