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

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



very elegant. thanks

On Tue, Feb 23, 2021 at 9:55 AM Michael Pelletier via HTCondor-users <htcondor-users@xxxxxxxxxxx> wrote:

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

Â

WANT_HOLDÂ=Â($(MEMORY_EXCEEDED))ÂÂ
WANT_HOLD_REASONÂ=Â\ÂÂ
ÂÂÂ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.--

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


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