It's more likely that the _expression_ is evaluating to undefined, which would behave the same as false.
I think you want to use =?= for comparison here so that if AcctGroup is not defined, undefined does not propagate.
To insure that the _expression_ always evaluates to a defined value, you can use ?: with RemoteUserPrio and SubmitterUserPrio.
This is also a good use case for the IfThenelse function, something like this
PREEMPTION_REQUIREMENTS = IfThenElse(AcctGroup =?= "no_preempt", false, (RemoteuserPrio ?: 0) > ((SubmitterUserPrio ?: 0) * 1.2))
Be sure to always use () to group the arguments of the ?: operator, since it has a pretty low operator precedence.
-tj
From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Gaetan Geffroy <gage@xxxxxxxxx>
Sent: Monday, October 4, 2021 11:44 AM To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx> Subject: [HTCondor-users] Disable preemption for an Accounting group Hi,
I would like to have a PREEMPTION_REQUIREMENTS _expression_ that is always false for one specific accounting group, and evaluates the user priority for all the other jobs. I have tried this:
PREEMPTION_REQUIREMENTS = (TARGET.AcctGroup != "no_preempt") && (RemoteUserPrio > TARGET.SubmitterUserPrio * 1.2) PREEMPTION_REQUIREMENTS = (TARGET.AccountingGroup != "no_preempt") && (RemoteUserPrio > TARGET.SubmitterUserPrio * 1.2) PREEMPTION_REQUIREMENTS = (TARGET.AccountingGroup != UNDEFINED && TARGET.AccountingGroup != "no_preempt") && (RemoteUserPrio > TARGET.SubmitterUserPrio * 1.2) PREEMPTION_REQUIREMENTS = (TARGET.AcctgGroup != UNDEFINED && TARGET.AcctgGroup != "no_preempt") && (RemoteUserPrio > TARGET.SubmitterUserPrio * 1.2)
But with these expressions nothing is preempted anymore, as if they were always false…
Thanks,
Gaëtan Geffroy |