HTCondorCEComputingElement

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.

DaysToKeepRemoteLogs:

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

DaysToKeepLogs:

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

ExtraSubmitString:

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.

UseLocalSchedd:

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)

WorkingDirectory:

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.

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 documentation for enabling the proxy refresh.

Code Documentation

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

Bases: ComputingElement

HTCondorCE computing element class implementing the functions jobSubmit, getJobOutput

__init__(ceUniqueID)

Standard constructor.

available(jobIDList=None)

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.

Parameters:

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

getCEStatus()

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.

getDescription()

Get CE description as a dictionary.

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

getJobLog(jobID)

Get pilot job logging info from HTCondor

Parameters:

jobID (str) – pilot job identifier

Returns:

string representing the logging info of a given pilot job

getJobOutput(jobID)

Get job outputs: output and error files from HTCondor

Parameters:

jobID (str) – job identifier

Returns:

tuple of strings containing output and error contents

getJobStatus(jobIDList)

Get the status information for the given list of jobs

initializeParameters()

Initialize the CE parameters after they are collected from various sources

isProxyValid(valid=1000)

Check if the stored proxy is valid

isValid()

Check the sanity of the Computing Element definition

killJob(jobIDList)

Kill the specified jobs

loadBatchSystem(batchSystemName)

Instantiate object representing the backend batch system

Parameters:

batchSystemName (str) – name of the batch system

sendOutput(stdid, line)

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

setCPUTimeLeft(cpuTimeLeft=None)

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

setParameters(ceOptions)

Add parameters from the given dictionary overriding the previous values

Parameters:

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

setProxy(proxy, valid=0)

Set proxy for this instance

setToken(token)
shutdown()

Optional method to shutdown the (Inner) Computing Element

submitJob(executableFile, proxy, numberOfJobs=1)

Method to submit job

writeProxyToFile(proxy)

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