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.

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

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

poll(builder)[source]

This method is responsible for polling PBS job which will update the job state. If job is complete we will gather job result. If job is pending we will stop timer and check if pend time exceeds max pend time for executor. If so we will cancel the job.

Parameters

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

gather(builder)[source]

This method is responsible for gather job results including output and error file and complete metadata for job which is stored in the builder object. We will retrieve job exitcode which corresponds to test returncode.

Parameters

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