buildtest.executors.pbs

This module implements PBSExecutor class that defines how executors submit job to PBS Scheduler

Module Contents

Classes

PBSExecutor

The PBSExecutor class is responsible for submitting jobs to PBS Scheduler.

TorqueExecutor

This class is a sub-class of PBSExecutor class and is responsible for Torque Executor

Attributes

logger

buildtest.executors.pbs.logger
class buildtest.executors.pbs.PBSExecutor(name, settings, site_configs, account=None, maxpendtime=None, timeout=None)[source]

Bases: buildtest.executors.base.BaseExecutor

The PBSExecutor class is responsible for submitting jobs to PBS Scheduler. The class implements the following methods:

  • load: load PBS executors from configuration file

  • dispatch: submit PBS job to scheduler

  • poll: poll PBS job via qstat and retrieve job state

  • gather: gather job result

  • cancel: cancel job if it exceeds max pending time

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

  • timeout (str, optional) – Test timeout in number of seconds

  • maxpendtime (int, optional) – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)

  • account (str, optional) – Account to use for job submission

  • maxpendtime – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)

type = 'pbs'
launcher_command(numprocs=None, numnodes=None)[source]
run(builder)[source]

This method is responsible for dispatching PBS job, get JobID and start record metadata in builder object. If job failed to submit we check returncode and exit with failure. After we submit job, we start timer and record when job was submitted and poll job once to get job details and store them in builder object.

Parameters:

builder (buildtest.buildsystem.base.BuilderBase) – An instance object of BuilderBase type

class buildtest.executors.pbs.TorqueExecutor(name, settings, site_configs, account=None, maxpendtime=None, timeout=None)[source]

Bases: PBSExecutor

This class is a sub-class of PBSExecutor class and is responsible for Torque Executor

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

  • timeout (str, optional) – Test timeout in number of seconds

  • maxpendtime (int, optional) – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)

  • account (str, optional) – Account to use for job submission

  • maxpendtime – Maximum Pending Time until job is cancelled. The default is 1 day (86400s)