MultiProcessorSiteDirector

The Multi Processor Site Director is an agent performing pilot job submission to particular sites. It is able to handle multicore jobs.

class DIRAC.WorkloadManagementSystem.Agent.MultiProcessorSiteDirector.MultiProcessorSiteDirector(*args, **kwargs)

Bases: DIRAC.WorkloadManagementSystem.Agent.SiteDirector.SiteDirector

__init__(*args, **kwargs)

c’tor

am_Enabled()
am_checkStopAgentFile()
am_createStopAgentFile()
am_disableMonitoring()
am_getBasePath()
am_getControlDirectory()
am_getCyclesDone()
am_getMaxCycles()
am_getModuleParam(optionName)
am_getOption(optionName, defaultValue=None)

Gets an option from the agent’s configuration section. The section will be a subsection of the /Systems section in the CS.

am_getPollingTime()
am_getShifterProxyLocation()
am_getStopAgentFile()
am_getWatchdogTime()
am_getWorkDirectory()
am_go()
am_initialize(*initArgs)

Common initialization for all the agents.

This is executed every time an agent (re)starts. This is called by the AgentReactor, should not be overridden.

am_monitoringEnabled()
am_removeStopAgentFile()
am_secureCall(functor, args=(), name=False)
am_setModuleParam(optionName, value)
am_setOption(optionName, value)
am_stopExecution()
beginExecution()

This is run at every cycle, as first thing.

  1. Check the pilots credentials.
  2. Get some flags and options used later
  3. Get the site description dictionary
  4. Get what to send in pilot wrapper
endExecution()
execute()

Main execution method (what is called at each agent cycle).

It basically just calls self.submitPilots() method

finalize()
getExecutable(queue, pilotsToSubmit, bundleProxy=True, jobExecDir='', envVariables=None, **kwargs)

Prepare the full executable for queue

Parameters:
  • queue (basestring) – queue name
  • pilotsToSubmit (int) – number of pilots to submit
  • bundleProxy (bool) – flag that say if to bundle or not the proxy
  • queue – pilot execution dir (normally an empty string)
Returns:

a string the options for the pilot

Return type:

basestring

getQueueSlots(queue, manyWaitingPilotsFlag)

Get the number of available slots in the queue

getQueues(resourceDict)

Get the list of relevant CEs and their descriptions

initialize()

Initial settings

monitorJobsQueuesPilots(matchingTQs)

Just printout of jobs queues and pilots status in TQ

sendPilotAccounting(pilotDict)

Send pilot accounting record

sendPilotSubmissionAccounting(siteName, ceName, queueName, numTotal, numSucceeded, status)

Send pilot submission accounting record :param str siteName: Site name :param str ceName: CE name :param str queueName: queue Name :param int numTotal: Total number of submission :param int numSucceeded: Total number of submission succeeded :param str status: ‘Succeeded’ or ‘Failed’

submitPilots()

Go through defined computing elements and submit jobs if necessary

updatePilotStatus()

Update status of pilots in transient states