MJF
The MJF utility calculates the amount of wall clock time left for a given batch system slot or VM. This is essential for the ‘Filling Mode’ where several jobs may be executed in the same slot.
Machine Job/Features are used following HSF-TN-2016-02 if available. Otherwise values are filled in using the batch system and CS information.
- class DIRAC.Core.Utilities.MJF.MJF
Bases:
object
Machine/Job Features methods
- __init__()
Standard constructor
- getIntJobFeature(key)
Returns JOBFEATURES/key as an int or None if not an int or not present
- getIntMachineFeature(key)
Returns MACHINEFEATURES/key as an int or None if not an int or not present
- getJobFeature(key)
Returns JOBFEATURES/key value saved in /LocalSite configuration by updateConfigFile() unless JOBFEATURES/shutdowntime_job when we try to fetch from the source URL itself again in case it changes.
- getMachineFeature(key)
Returns MACHINEFEATURES/key value saved in /LocalSite configuration by updateConfigFile() unless MACHINEFEATURES/shutdowntime when we try to fetch from the source URL itself again in case it changes.
- getWallClockSecondsLeft()
Returns the number of seconds until either the wall clock limit or the shutdowntime(_job) is reached.
- mjfKeys = {'JOBFEATURES': ['allocated_cpu', 'hs06_job', 'shutdowntime_job', 'grace_secs_job', 'jobstart_secs', 'job_id', 'wall_limit_secs', 'cpu_limit_secs', 'max_rss_bytes', 'max_swap_bytes', 'scratch_limit_bytes'], 'MACHINEFEATURES': ['total_cpu', 'hs06', 'shutdowntime', 'grace_secs']}
- updateConfig(pilotStartTime=None)
Populate /LocalSite/MACHINEFEATURES and /LocalSite/JOBFEATURES with MJF values This is run early in the job to update the configuration file that subsequent DIRAC scripts read when they start.