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

Re: [HTCondor-users] Is there a non-hack way to have a submit description exit and throw an error message?



No it would not work.

An if expression in a submit file is evaluated only once - when the submit file is parsed.

For your example to work it would need to be evaluated once for each file. 

In fact, by the time we parse the Queue statement, it is too late to set an If condition,
Condor_submit will parsed everything before the Queue statement and evaluate
every If statement in the submit file before it parses and evaluates the queue statement.

-tj

-----Original Message-----
From: HTCondor-users [mailto:htcondor-users-bounces@xxxxxxxxxxx] On Behalf Of Dimitri Maziuk
Sent: Monday, September 26, 2016 4:28 PM
To: htcondor-users@xxxxxxxxxxx
Subject: Re: [HTCondor-users] Is there a non-hack way to have a submit description exit and throw an error message?

On 09/26/2016 04:15 PM, John M Knoeller wrote:
> 8.5.7 will have error and warning keywords in submit (and config) files.
> 
> # this generates a message and aborts the submit If 
> $(INPUT_IS_INVALID)
>    Error : -- $(INPUT_FILE) is invalid ---- Endif
> 
> # this generates a message and continues If $(QESTIONABLE_BEHAVOR)
>    Warning : You really shouldn't do that...
> Endif

Would this work:

if $(INPUT_IS_INVALID)
  warning: $(INPUT_FILE) no good
  $(BAD_ONES)++
endif

if $(BAD_ONES) > $(NUM_INPUT_FILES)/2
  error: oh what's the point...
endif

just curious
--
Dimitri Maziuk
Programmer/sysadmin
BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu