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

Re: [HTCondor-users] How specify out/err files for a DAGMan PRE script?



Hi Siarhei,

Unfortunately DAGMan does not have a way of specifying files to write a scripts stdout and stderr into. You would have to do something in the script to get that output currently. If your script is a bash script you can have the script redirect its stdout and stderr to a file at the beginning with something like:

#!/bin/bash
exec > /path/to/file
exec 2>&1

This will redirect both the stdout and stderr to /path/to/file. I will say that the idea of being able to specify files to have script stdout and stderr written to it is a great idea. I will look into adding that capability to DAGMan.

Cheers,
Cole Bollig

From: HTCondor-users <htcondor-users-bounces@xxxxxxxxxxx> on behalf of Vaurynovich, Siarhei <siarhei.vaurynovich@xxxxxxxxxxxxx>
Sent: Friday, July 21, 2023 7:39 AM
To: htcondor-users@xxxxxxxxxxx <htcondor-users@xxxxxxxxxxx>
Subject: [HTCondor-users] How specify out/err files for a DAGMan PRE script?
 

Hello,

 

I have a DAGMan PRE script which works fine most of the time but about once in a month it fails for unknow reason. Looking at where its STDOUT/STDERR point to I can see:

$  readlink -f /proc/4165884/fd/1

/dev/null

$  readlink -f /proc/4165884/fd/2

/dev/null

 

which makes it impossible to figure out why the PRE script fails.

 

Could you please let me know if there is a way to specify out/err files for a DAGMan PRE script to debug situations like this?

 

Thank you very much for your help,

Siarhei.

 

............................................................................

Trading instructions sent electronically to Bernstein shall not be deemed
accepted until a representative of Bernstein acknowledges receipt
electronically or by telephone.  Comments in this e-mail transmission and
any attachments are part of a larger body of investment analysis. For our
research reports, which contain information that may be used to support
investment decisions, and disclosures see our website at
www.bernsteinresearch.com.

For further important information about AllianceBernstein please click here
http://www.alliancebernstein.com/disclaimer/email/disclaimer.html