[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?



Hmm,

Iâm not so sure if I like the idea myself but what about SUBMIT_REQUIREMENTS and a custom python classads-registered function?

I canât recall whether it generates a new cluster before submit-req or not.

Then at least youâd get  a nice customizable error-message and move any ugliness out of the submit files.

Cheers, Iain

On Sep 26, 2016, at 19:29, Michael Pelletier <Michael.V.Pelletier@xxxxxxxxxxxx> wrote:

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

Attachment: smime.p7s
Description: S/MIME cryptographic signature