HTCondorCE Computing Element

Allows direct submission to HTCondorCE Computing Elements with a SiteDirector Agent

Configuration Parameters

Configuration for the HTCondorCE submission can be done via the configuration system. See the page about configuring Resources / Computing for where the options can be placed.


Location to store the pilot and condor log files locally. It should exist on the server and be accessible (both readable and writeable). Also temporary files like condor submit files are kept here. This option is only read from the global Resources/Computing/HTCondorCE location.


How long to keep the log files on the remote schedd until they are removed


How long to keep the log files locally until they are removed


Additional options for the condor submit file, separate options with ‘n’, for example:

request_cpus = 8 \n periodic_remove = ...

CERN proposes additional features to the standard HTCondor implementation. Among these features, one can find an option to limit the allocation runtime (+MaxRuntime), that does not exist in the standard HTCondor version: no explicit way to define a runtime limit (maxCPUTime would act as the limit). On CERN-HTCondor CEs, one can use CERN-specific features via the ExtraSubmitString configuration parameter.


If False, directly submit to a remote condor schedule daemon, then one does not need to run condor daemons on the submit machine. If True requires the condor grid middleware (condor_submit, condor_history, condor_q, condor_rm)

Proxy renewal or lifetime

When not using a local condor_schedd, add delegate_job_GSI_credentials_lifetime = 0 to the ExtraSubmitString.

When using a local condor_schedd look at the HTCondor documenation for enabling the proxy refresh.

Code Documentation

class DIRAC.Resources.Computing.HTCondorCEComputingElement.HTCondorCEComputingElement(ceUniqueID)

Bases: DIRAC.Resources.Computing.ComputingElement.ComputingElement

HTCondorCE computing element class implementing the functions jobSubmit, getJobOutput


Standard constructor.


This method returns the number of available slots in the target CE. The CE instance polls for waiting and running jobs and compares to the limits in the CE parameters.


jobIDList (list) – list of already existing job IDs to be checked against


Method to return information on running and pending jobs.

Warning: information currently returned depends on the PilotManager and not HTCondor. Results might be wrong if pilots or jobs are submitted manually via the CE.


Get CE description as a dictionary.

This is called by the JobAgent for the case of “inner” CEs.


Get pilot job logging info from HTCondor


jobID (str) – pilot job identifier


string representing the logging info of a given pilot job


Get job outputs: output and error files from HTCondor


jobID (str) – job identifier


tuple of strings containing output and error contents


Get the status information for the given list of jobs


Initialize the CE parameters after they are collected from various sources


Check if the stored proxy is valid


Check the sanity of the Computing Element definition


Kill the specified jobs


Instantiate object representing the backend batch system


batchSystemName (str) – name of the batch system

sendOutput(stdid, line)

Callback function such that the results from the CE may be returned.


Update the CPUTime parameter of the CE classAd, necessary for running in filling mode


Add parameters from the given dictionary overriding the previous values


ceOptions (dict) – CE parameters dictionary to update already defined ones

setProxy(proxy, valid=0)

Set proxy for this instance


Optional method to shutdown the (Inner) Computing Element

submitJob(executableFile, proxy, numberOfJobs=1)

Method to submit job


CE helper function to write a CE proxy string to a file.


Extract tuple of jobURL and jobID from the jobRef string. The condorID as well as the path leading to the job results are also extracted from the jobID.


jobRef (str) – PilotJobReference of the following form: htcondorce://<ceName>/<condorID>:::<pilotStamp>


tuple composed of the jobURL, the path to the job results and the condorID of the given jobRef

DIRAC.Resources.Computing.HTCondorCEComputingElement.findFile(workingDir, fileName, pathToResult)

Find a file in a file system.

  • workingDir (str) – the name of the directory containing the given file to search for

  • fileName (str) – the name of the file to find

  • pathToResult (str) – the path to follow from workingDir to find the file


path leading to the file

DIRAC.Resources.Computing.HTCondorCEComputingElement.logDir(ceName, stamp)

Return path to log and output files for pilot.

  • ceName (str) – Name of the CE

  • stamp (str) – pilot stamp from/for jobRef