glexecComputingElement

A computing element class that attempts to use glexec if available then defaults to the standard InProcess Computing Element behaviour.

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

Bases: ComputingElement

__init__(ceUniqueID)

Standard constructor.

analyseExitCode(resultTuple)

Analyses the exit codes in case of glexec failures. The convention for glexec exit codes is listed below:

Shell exit codes: 127 - command not found 129 - command died due to signal 1 (SIGHUP) 130 - command died due to signal 2 (SIGINT)

glexec specific codes: 201 - client error 202 - internal error 203 - authz error

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.

getDescription()

Get CE description as a dictionary.

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

glexecExecute(executableFile, glexecLocation)

Run glexec with checking of the exit status code.

glexecLocate()

Try to find glexec on the local system, if not found default to InProcess.

glexecTest(glexecLocation)

Ensure that the current DIRAC distribution is group readable e.g. dirac-proxy-info also check the status code of the glexec call.

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

loadBatchSystem(batchSystemName)

Instantiate object representing the backend batch system

Parameters

batchSystemName (str) – name of the batch system

monitorProxy(glexecLocation, payloadProxy)

Monitor the payload proxy and renew as necessary.

recursivelyChangePermissions()

Ensure that the current directory and all those beneath have the correct permissions.

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

shutdown()

Optional method to shutdown the (Inner) Computing Element

submitJob(executableFile, proxy, dummy=None)

Method to submit job, should be overridden in sub-class.

writeProxyToFile(proxy)

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