LocalComputingElement is a class to handle non-grid computing clusters

Allows direct submission to underlying Batch Systems.

Configuration Parameters

Configuration for the LocalComputingElement submission can be done via the configuration system.


Underlying batch system that is going to be used to orchestrate executable files. The Batch System has to be accessible from the LocalCE. By default, the LocalComputingElement submits directly on the host via the Host class.


Underlying parallel library used to generate a wrapper around the executable files to run them in parallel on multiple nodes.


Area used to store executable/output/error files if they are not aready defined via BatchOutput, BatchError, InfoArea, ExecutableArea and/or WorkArea. The path should be absolute.


Area where the job outputs are stored. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.


Area where the job errors are stored. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.


Area where the executable files are stored if necessary: this is the case when a parallel library is used. Indeed, the executable has to be accessible to the batch system. This might not be the case if multiple file systems are present on the host. If not defined: SharedArea + ‘/data’ is used. If not absolute: SharedArea + path is used.

Code Documentation

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

Bases: DIRAC.Resources.Computing.ComputingElement.ComputingElement


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.


Get CE description as a dictionary.

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

getJobOutput(jobID, localDir=None)

Get the specified job standard output and error files. If the localDir is provided, the output is returned as file in this directory. Otherwise, the output is returned as strings.


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 a bunch of jobs


Instantiate object representing the backend batch system


batchSystemName (str) – name of the batch system

loadParallelLibrary(parallelLibraryName, workingDirectory='.')

Instantiate object representing the parallel library that will generate a script to wrap the executable


parallelLibraryName (str) – name of the parallel library

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=None, numberOfJobs=1)

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


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