:py:mod:`buildtest.executors.slurm` =================================== .. py:module:: buildtest.executors.slurm .. autoapi-nested-parse:: This module implements the SlurmExecutor class responsible for submitting jobs to Slurm Scheduler. This class is called in class BuildExecutor when initializing the executors. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: buildtest.executors.slurm.SlurmExecutor Attributes ~~~~~~~~~~ .. autoapisummary:: buildtest.executors.slurm.logger .. py:data:: logger .. py:class:: SlurmExecutor(name, settings, site_configs, account=None, maxpendtime=None, timeout=None) Bases: :py:obj:`buildtest.executors.base.BaseExecutor` The SlurmExecutor class is responsible for submitting jobs to Slurm Scheduler. The SlurmExecutor performs the following steps: - **load**: load slurm configuration from buildtest configuration file - **dispatch**: dispatch job to scheduler and acquire job ID - **poll**: wait for Slurm jobs to finish, if job is pending and exceeds `maxpendtime` then cancel job - **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. :param name: name of executor :type name: str :param setting: setting for a given executor defined in configuration file :type setting: dict :param site_configs: Instance of SiteConfiguration class :type site_configs: buildtest.config.SiteConfiguration :param timeout: Test timeout in number of seconds :type timeout: str, optional :param maxpendtime: Maximum Pending Time until job is cancelled. The default is 1 day (86400s) :type maxpendtime: int, optional :param account: Account to use for job submission :type account: str, optional :param maxpendtime: Maximum Pending Time until job is cancelled. The default is 1 day (86400s) :type maxpendtime: int, optional .. py:attribute:: type :value: 'slurm' .. py:method:: launcher_command(numprocs=None, numnodes=None) Return sbatch launcher command with options used to submit job .. py:method:: run(builder) This method is responsible for dispatching job to slurm scheduler and extracting job id. If job id is valid we pass the job to :class:`buildtest.executors.slurm.SlurmJob` class and store object in ``builder.job``. :param builder: An instance object of BuilderBase type :type builder: buildtest.buildsystem.base.BuilderBase .. py:method:: gather(builder) Gather Slurm job data after job completion. In this step we call ``builder.job.gather()``, and update builder metadata such as returncode, output and error file. :param builder: An instance object of BuilderBase type :type builder: buildtest.buildsystem.base.BuilderBase