SiteConfig#
- class lsst.ctrl.bps.parsl.SiteConfig(config: BpsConfig, resource_list: list = None)#
Bases:
ABCBase class for site configuration.
Subclasses need to override at least the
get_executorsandselect_executormethods.Parameters#
- config
BpsConfig BPS configuration.
- resource_list
list, optional List of parsl resource specifications to pass to the executor.
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.
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 assite.<computeSite>.class(str), which should be the fully-qualified name of a python class that inherits fromSiteConfig.Parameters#
- config
BpsConfig BPS configuration.
Returns#
- site_configsubclass of
SiteConfig Site configuration.
- config
- 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 byget_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:
site.<computeSite>.commandPrefix(str): command(s) to use as a prefix to executing a job command on a worker.site.<computeSite>.environment(bool): add bash commands that replicate the environment on the driver/submit machine?
- abstract get_executors() list[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:
site.<computeSite>.monitorEnable(bool): enable monitor?site.<computeSite>.monitorInterval(float): time interval (sec) between logging of resource usage.site.<computeSite>.monitorFilename(str): name of file to use for the monitor sqlite database.
Returns#
- monitor
MonitoringHuborNone Parsl monitor, or
Nonefor no monitor.
- 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#
- config
parsl.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 issite.<computeSite>.Parameters#
- config
BpsConfig BPS configuration.
Returns#
- site
BpsConfig Site sub-configuration.
- config
- config