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

Re: [HTCondor-users] Specifying log files from python

If you are using HTCondor v8.6.6 or above, I recommend using the htcondor.Submit() class to submit jobs instead of the Schedd() class. With the Submit class, you do not have to convert your submit file into a classad - the Submit class will do that for you. So if you have a condor_submit file that works, you are likely good to go. Much easier than trying to use the more primitive submit method in the Schedd class in my opinion.  Details on the Submit class are in the Manual, and there is an example submitting a job with the Submit class in this ticket:

Hope this helps

Sent from my iPhone

On Dec 27, 2017, at 11:59 AM, Larry Martell <larry.martell@xxxxxxxxx> wrote:

On this site: http://osgtech.blogspot.com/2014/03/submitting-jobs-to-htcondor-using-python.html
I see this:

For example, consider the following submit file:

executable = test.sharguments = foo bar
log = test.log
output = test.out.$(Process)
error = test.err
transfer_output_files = output
should_transfer_files = yes
queue 1

The equivalent submit ClassAd is:

   Cmd = "test.sh";
   Arguments = "foo bar"
   UserLog = "test.log";
   Out = strcat("test.out",ProcId);
   Err = "test.err";
   TransferOutput = "output";
   ShouldTransferFiles = "YES";

So in my python code I create this logging in my ClassAd:

       Err = "strcat(\"/Staging/Repos/CAPbase/cluster/logs/compute_radiology.err\",
       Out = "strcat(\"/Staging/Repos/CAPbase/cluster/logs/compute_radiology.out\",
       UserLog =

But I see this in the SchedLog:

12/27/17 12:34:15 (pid:3755290) WriteUserLog::initialize:
ProcId)") failed - errno 2 (No such file or directory)

/opt/capcompute/util/ is the dir the python script that is submitting
the job is running from.

What am I doing wrong here? How do I properly specify the path and
file name for the logs?
HTCondor-users mailing list
To unsubscribe, send a message to htcondor-users-request@xxxxxxxxxxx with a
subject: Unsubscribe
You can also unsubscribe by visiting

The archives can be found at: