buildtest.executors.lsf
¶
This module implements the LSFExecutor class responsible for submitting jobs to LSF Scheduler. This class is called in class BuildExecutor when initializing the executors.
Module Contents¶
Classes¶
The LSFExecutor class is responsible for submitting jobs to LSF Scheduler. |
Attributes¶
- buildtest.executors.lsf.logger¶
- class buildtest.executors.lsf.LSFExecutor(name, settings, site_configs, account=None, maxpendtime=None)[source]¶
Bases:
buildtest.executors.base.BaseExecutor
The LSFExecutor class is responsible for submitting jobs to LSF Scheduler. The LSFExecutor performs the following steps
load: load lsf configuration from buildtest configuration file
dispatch: dispatch job to scheduler and acquire job ID
poll: wait for LSF jobs to finish
gather: Once job is complete, gather job data
Initiate a base executor, meaning we provide a name (also held by the BuildExecutor base that holds it) and the loaded dictionary of config opts to parse.
- Parameters
name (str) – name of executor
setting (dict) – setting for a given executor defined in configuration file
site_configs (buildtest.config.SiteConfiguration) – Instance of SiteConfiguration class
- type = lsf¶
- launcher_command(self, numprocs=None, numnodes=None)[source]¶
This command returns the launcher command and any options specified in configuration file. This is useful when generating the build script in the BuilderBase class
- run(self, builder)[source]¶
This method is responsible for dispatching job to scheduler and extracting job ID by applying a
re.search
against output at onset of job submission. If job id is not retrieved due to job failure or unable to match regular expression we mark job incomplete by invokingbuildtest.buildsystem.base.BuilderBase.incomplete`()
method and return from method.If we have a valid job ID we invoke
buildtest.executors.lsf.LSFJob
class given the job id to poll job and store this intobuilder.job
attribute.- Parameters
builder (buildtest.buildsystem.base.BuilderBase) – An instance object of BuilderBase type
- poll(self, builder)[source]¶
Given a builder object we poll the job by invoking builder method
builder.job.poll()
return state of job. If job is suspended or pending we stop timer and check if timer exceeds maxpendtime value which could be defined in configuration file or passed via command line--max-pend-time
- Parameters
builder (buildtest.buildsystem.base.BuilderBase) – An instance object of BuilderBase type
- gather(self, builder)[source]¶
Gather Job detail after completion of job by invoking the builder method
builder.job.gather()
. We retrieve exit code, output file, error file and update builder metadata.- Parameters
builder (buildtest.buildsystem.base.BuilderBase) – An instance object of BuilderBase type