JobParameters

DIRAC Workload Management System utility module to get available memory and processors from mjf

DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getJobFeatures()
DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getMemoryFromMJF()
DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getMemoryFromProc()
DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getNumberOfGPUs(siteName=None, gridCE=None, queue=None)

Gets GPUs on a certain CE/queue/node (what the pilot administers)

The siteName/gridCE/queue parameters are normally not necessary.

Tries to find it in this order: 1) from the /Resources/Computing/CEDefaults/GPUs (which is what the pilot might fill up) 2) if not present looks in CS for “NumberOfGPUs” Queue or CE option 3) return 0

DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getNumberOfJobProcessors(jobID)

Gets the number of processors allowed for the job. This can be used to communicate to your job payload the number of processors it’s allowed to use, so this function should be called from your extension.

If the JobAgent is using “InProcess” CE (which is the default), then what’s returned will basically be the same of what’s returned by the getNumberOfProcessors() function above

DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getNumberOfPayloadProcessors(siteName=None, gridCE=None, queue=None)

Gets the number of processors allowed for a single JobAgent (so for a “inner” CE). (NB: this does not refer to the job processors). This is normally used ONLY when a pilot instantiates more than one JobAgent (MultiLaunchAgent pilot command).

The siteName/gridCE/queue parameters are normally not necessary.

Tries to find it in this order: 1) from the /Resources/Computing/CEDefaults/NumberOfPayloadProcessors (which is what pilot 3 fills up) 2) if not present but there’s WholeNode tag, use the getNumberOfProcessors function above 3) otherwise returns 1

DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getNumberOfProcessors(siteName=None, gridCE=None, queue=None)

gets the number of processors on a certain CE/queue/node (what the pilot administers)

The siteName/gridCE/queue parameters are normally not necessary.

Tries to find it in this order: 1) from the /Resources/Computing/CEDefaults/NumberOfProcessors (which is what the pilot fills up) 2) if not present from JobFeatures 3) if not present looks in CS for “NumberOfProcessors” Queue or CE option 4) if not present but there’s WholeNode tag, look what the WN provides using multiprocessing.cpu_count() 5) return 1

DIRAC.WorkloadManagementSystem.Utilities.JobParameters.getProcessorFromMJF()