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

Re: [HTCondor-users] best way to append WANT_HOLD reason

I do something similar with the start _expression_, and the trick is simply a nested set of conditional expressions. Instead of âundefinedâ in your example, youâd have another ifThenElse, creating whatâs essentially a switch statement.


You can nest them by self-reference:


Want_hold_reason = undefined

Want_hold_reason = ifThenElse( $(Memory_exceeded), âmemory exceededâ, $(Want_hold_reason) )

Want_hold_reason = ifThenElse( $(Cpu_exceeded), âcpu allocation exceededâ, $(Want_hold_reason) )


This allows you to spread the settings across multiple config files.


Michael V Pelletier

Principal Engineer

Raytheon Technologies

Digital Technology

HPC Support Team


From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of rmorgan466@xxxxxxxxx
Sent: Monday, February 22, 2021 8:42 PM
To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
Subject: [External] [HTCondor-users] best way to append WANT_HOLD reason


Looking at WANT_HOLD


   ifThenElse( $(MEMORY_EXCEEDED), \  
               "Your job used too much virtual memory.", \  
               undefined )

What if  I have 5+ reasons to hold a job. What is the most sanest and maintainability perspective to construct the WANT_HOLD_REASON clause? 


My reasons are: if the job gets executed from a certain submitter, time of day,  job duration, memory, etc..





--- Get your facts first, then you can distort them as you please.--