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: DIRAC.Resources.Computing.ComputingElement.ComputingElement


Standard constructor.


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


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

Method to return information on running and pending jobs.


Get CE description as a dictionary.

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


Get the CE complete parameter dictionary

glexecExecute(executableFile, glexecLocation)

Run glexec with checking of the exit status code.


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


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


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


Instantiate object representing the backend batch system

mandatoryParameters = []
monitorProxy(glexecLocation, pilotProxy, payloadProxy)

Monitor the payload proxy and renew as necessary.


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.


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


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

submitJob(executableFile, proxy, dummy=None)

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


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