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

Re: [HTCondor-users] Making transfer_output / transfer_error depend on ExitCode



Dear TJ,

Am 02.07.19 um 21:52 schrieb John M Knoeller:
> You could try
> 
> transfer_output = (ExitBySignal =?= True) || (ExitCode =!= 0)
> 
> (I assumed that you meant to invert the expression logic, since that's what you said he wanted)

oh yes - of course, you are right, the logic was backwards, and of course the special =!=/=?= operators should help to get around the submission part
(but they already show the evaluation seems to happen too early). 

Submission works that way, of course - but as you already presumed, it does not really work, i.e. output is just always transferred. I also tried some ifThenElse contruction
in assigning "Output = ", but that fails since it does not seem to be evaluated as expression (the evaluator then prefixes the "ifThenElse" with the current path, assuming it's a filename). 

So it seems the only way (for now) is for the user to do that in a wrapper script around the job, right? 
At least for a simple exit code from the main job executable, this should work (e.g. write the output to a file in scratch and echo it at the end / copy it to some other persistent storage
instead of file transfer). Of course, this makes condor_tail etc. a bit harder, but it seems the only workaround. 

Other ideas of course welcome ;-). 

Cheers,
	Oliver

> 
> Using =?= and =!=  will make this always evaluate to a Boolean - which gets you past the submission problem. 
> But I'm not sure if it's actually going to *work* if the result of evaluation changes from false at submission time to true when the job exits with failure.
> 
> -tj
> 
> -----Original Message-----
> From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> On Behalf Of Oliver Freyermuth
> Sent: Tuesday, July 2, 2019 2:58 AM
> To: HTCondor-Users Mail List <htcondor-users@xxxxxxxxxxx>
> Subject: [HTCondor-users] Making transfer_output / transfer_error depend on ExitCode
> 
> Dear HTCondor experts,
> 
> one of our users had a rather simple question, but it seems the solution is not as easy as expected (or I am missing something).
> 
> He wants to transfer job output (stdout) and error (stderr) back to the submit node via file transfer only if the job exits with an exit-code != 0.
> 
> I tried:
> ------------
> transfer_output=(ExitBySignal == False) && (ExitCode == 0)
> ------------
> but during submission, this yields:
> ------------
> Submitting job(s) ERROR: transfer_output=(ExitBySignal == False) && (ExitCode == 0) is invalid, must eval to a boolean.
> ------------
> I presume by design this must be evaluated on submission (to decide if the file permission checks need to be done, which were in the past done during submission by default).
> 
> Is there another way?
> 
> Cheers,
> 	Oliver
> 
> 
> _______________________________________________
> 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