WorkQueue¶
- class lsst.ctrl.bps.parsl.sites.WorkQueue(*args, **kwargs)¶
- Bases: - SiteConfig- Base class configuraton for - WorkQueueExecutor.- Subclasses must provide implementations for - .get_executorsand- .select_executor. In- .get_executors, the site-specific- ExecutionProvidermust be defined.- Parameters:
 - Notes - The following BPS configuration parameters are recognized, overriding the defaults: - port(- int): The port used by work_queue. Default:- 9000.
- worker_options (`str`): Extra options to pass to work_queue workers. A typical option specifies the memory available per worker, e.g., ``"--memory=90000", which sets the available memory to 90 GB. Default:- ""
- wq_max_retries(- int): The number of retries that work_queue will make in case of task failures. Set to- Noneto have work_queue retry forever; set to- 1to have retries managed by Parsl. Default:- 1
 - Methods Summary - from_config(config)- Get the site configuration nominated in the BPS config. - Return the IP address of the machine hosting the driver/submission. - Return command(s) to add before each job command. - Get a list of executors to be used in processing. - Get parsl monitor. - Get Parsl configuration for this site. - get_site_subconfig(config)- Get BPS configuration for the site of interest. - make_executor(label, provider, *[, port, ...])- Return a - WorkQueueExecutor.- select_executor(job)- Get the - labelof the executor to use to execute a job.- Methods Documentation - classmethod from_config(config: BpsConfig) SiteConfig¶
- Get the site configuration nominated in the BPS config. - The - computeSite(- str) value in the BPS configuration is used to select a site configuration. The site configuration class to use is specified by the BPS configuration as- site.<computeSite>.class(- str), which should be the fully-qualified name of a python class that inherits from- SiteConfig.- Parameters:
- configBpsConfig
- BPS configuration. 
 
- config
- Returns:
- site_configsubclass of SiteConfig
- Site configuration. 
 
- site_configsubclass of 
 
 - get_address() str¶
- Return the IP address of the machine hosting the driver/submission. - This address should be accessible from the workers. This should generally by the return value of one of the functions in - parsl.addresses.- This is used by the default implementation of - get_monitor, but will generally be used by- get_executorstoo.- This default implementation gets the address from the hostname, but that will not work if the workers don’t access the driver/submission node by that address. 
 - get_command_prefix() str¶
- Return command(s) to add before each job command. - These may be used to configure the environment for the job. - This default implementation respects the BPS configuration elements: 
 - abstract get_executors() list[parsl.executors.base.ParslExecutor]¶
- Get a list of executors to be used in processing. - Each executor should have a unique - label.
 - get_monitor() MonitoringHub | None¶
- Get parsl monitor. - The parsl monitor provides a database that tracks the progress of the workflow and the use of resources on the workers. - This implementation respects the BPS configuration elements: 
 - get_parsl_config() Config¶
- Get Parsl configuration for this site. - Subclasses can overwrite this method to build a more specific Parsl configuration, if required. - The retries are set from the - site.<computeSite>.retriesvalue found in the BPS configuration file.- Returns:
- configparsl.config.Config
- The configuration to be used for Parsl. 
 
- config
 
 - static get_site_subconfig(config: BpsConfig) BpsConfig¶
- Get BPS configuration for the site of interest. - We return the BPS sub-configuration for the site indicated by the - computeSitevalue, which is- site.<computeSite>.- Parameters:
- configBpsConfig
- BPS configuration. 
 
- config
- Returns:
- siteBpsConfig
- Site sub-configuration. 
 
- site
 
 - make_executor(label: str, provider: ExecutionProvider, *, port: int = 9000, worker_options: str = '', wq_max_retries: int = 1) ParslExecutor¶
- Return a - WorkQueueExecutor. The- providercontains the site-specific configuration.- Parameters:
- labelstr
- Label for executor. 
- providerExecutionProvider
- Parsl execution provider, e.g., - SlurmProvider.
- portint, optional
- Port used by work_queue. Default: - 9000.
- worker_optionsstr, optional
- Extra options to pass to work_queue workers, e.g., - "--memory=90000". Default:- "".
- wq_max_retriesint, optional
- Number of retries for work_queue to attempt per job. Set to - Noneto have it try indefinitely; set to- 1to have Parsl control the number of retries. Default:- 1.
 
- label