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

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



Consider the following:

 

INPUT_FILE = /u/mvpel/inputdata.csv

Include : /u/mvpel/validate_input.sh $(INPUT_FILE) |

 

… and the validate_input.sh is written to generate “INPUT_IS_INVALID = False” on stdout if it doesn’t like what it sees. And then:

 

If $(INPUT_IS_INVALID)

    Include : ---- $(INPUT_FILE) is invalid -----

endif

queue 100

 

And you get the following when you try to submit:

 

Submitting job(s)Submit file Error "----- /u/mvpel/inputdata.csv is invalid -----", Line 0, Include Depth 1: can't open file

ERROR: on Line 25 of submit file:

ERROR: Failed to parse command file (line 25).

 

This means that nobody even attempts to talk to the schedd unless the submission has been confirmed as valid by the script, rather than running the validation in each job as a PreCmd or having to create a DAG or condor_submit wrapper script to perform the validation step.

 

So what I’m wondering is if there’s some sort of pragma or assertion in the submit description that could simply spit out an error message, rather than how I’m trying to trick it into displaying what I want by giving it a message masquerading as a broken include file name.

 

I haven’t found anything relevant in the 8.4.8 manual or the 8.5.6 manual thus far. Perhaps there is (or should be) another bit of syntax like so:

 

if $(INPUT_IS_INVALID)

    error : $(INPUT_FILE) is invalid

endif

 

And if condor_submit hits an “error:” line it immediately bails out like so with a clean error message:

 

Submitting job(s)

Submit file Error on line 25:

“/u/mvpel/inputdata.csv is invalid”

Thanks for any suggestions!

 

                -Michael Pelletier.