Hi folks, I’ve got a PostCmd set up in a job submission which I’m working on translating from a stack of legacy scripts into an 8.4 submit description, but I’m finding that it’s difficult to debug the PostCmd. If the stdout and/or stderr is going
anywhere, I have no idea where it is. Since the PreCmd and PostCmd aren’t given to a shell, for obvious reasons, it’s not possible to use shell redirection characters directly in the PostCmd, and transferring /bin/sh and doing the following is a bit unwieldy: Transfer_input_files = postprocess.exe, /bin/sh +PostArguments = “-c ‘postprocess.exe > postprocess.out 2>&1’ “ Is there a more sleek way to handle this within HTCondor that I’m missing? PostOut/PostError? In this case I could modify the code to add an “output file” option, but in some cases the code is provided by third-parties and is not quite
as amenable to amendment. Or is best practice just a matter of writing a basic wrapper script? Considering that the job may want to evaluate the _CONDOR_MAINJOB_EXIT_CODE or what have you before attempting the PostCmd, that may be a better approach anyway. -Michael Pelletier. |