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. |
-
class
buildtest.executors.lsf.
LSFExecutor
(name, settings, config_opts)¶ Bases:
buildtest.executors.base.BaseExecutor
The LSFExecutor class is responsible for submitting jobs to LSF Scheduler. The LSFExecutor performs the following steps
check: check if lsf queue is available for accepting jobs. 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
-
format_fields
= ['job_name', 'stat', 'user', 'user_group', 'queue', 'proj_name', 'pids', 'exit_code', 'from_host', 'exec_host', 'submit_time', 'start_time', 'finish_time', 'nthreads', 'exec_home', 'exec_cwd', 'output_file', 'error_file']¶
-
job_state
¶
-
poll_cmd
= bjobs¶
-
steps
= ['check', 'dispatch', 'poll', 'gather', 'close']¶
-
type
= lsf¶
-
cancel
(self)¶ Cancel LSF job, this is required if job exceeds max pending time in queue
-
check
(self)¶ Checking binary for lsf launcher and poll command. If not found we raise error
-
dispatch
(self)¶ This method is responsible for dispatching job to scheduler.
-
gather
(self)¶ Gather Job detail after completion of job. This method will retrieve output fields defined for
self.format_fields
. buildtest will runbjobs -o '<field1> ... <fieldN>' <JOBID> -json
.
-
load
(self)¶ Load the a LSF executor configuration from buildtest settings.
-
poll
(self)¶ This method will poll for job by using bjobs and return state of job. The command to be run is
bjobs -noheader -o 'stat' <JOBID>
which returns job state.
-