SingularityComputingElement

A computing element class using singularity containers.

This computing element will start the job in the container set by the “ContainerRoot” config option.

DIRAC will the re-installed within the container, extra flags can be given to the dirac-install command with the “ContainerExtraOpts” option.

See the Configuration/Resources/Computing documention for details on where to set the option parameters.

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

Bases: DIRAC.Resources.Computing.ComputingElement.ComputingElement

A Computing Element for running a job within a Singularity container.

__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(jobIDList=None)

Method to return information on running and pending jobs.

getDescription()

Get CE description as a dictionary

getParameterDict()

Get the CE complete parameter dictionary

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()

Instantiate object representing the backend 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

submitJob(executableFile, proxy, jobDesc, log, logLevel, **kwargs)

Start a container for a job. executableFile is ignored. A new wrapper suitable for running in a container is created from jobDesc.

writeProxyToFile(proxy)

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