salvus.flow.sites.task_chain.task_chain_site_config
Task chain specific site configuration.
Classes
TaskChainSiteConfig
TaskChainSiteConfigclass TaskChainSiteConfig(
salvus.flow.utils.serialization_helpers.SerializationMixin
):
def __init__(
self,
site_name: str,
number_of_parallel_workers: int,
ranks_per_salvus_simulation: int,
max_threads_per_worker: int,
shared_file_system: bool,
environment_variables_per_worker: Optional[
List[Dict[str, str]]
] = None,
memory_per_rank_in_MB: Optional[float] = None,
wall_time_in_seconds_per_task_chain: Optional[int] = None,
task_chain_runner_call_prefix: Optional[str] = None,
custom_mpi_template: Optional[str] = None,
max_concurrent_chains: Optional[int] = None,
):
...Site configuration for a task chain runner site.
Parameters
site_namestr — Name of the site.number_of_parallel_workersint — The number of parallel task chain workers on the site.ranks_per_salvus_simulationint — The number of ranks for a salvus simulation in each parallel task chain runner.max_threads_per_workerint — The number of threads per worker - this is currently not used.shared_file_systembool — True if the filesystem is shared between the runner and the controller.environment_variables_per_workerOptional[List[Dict[str, str]]] — One set of environment variables per parallel worker. That way the different workers can for example use different GPUs.memory_per_rank_in_MBOptional[float] — The memory per rank in megabytes.wall_time_in_seconds_per_task_chainOptional[int] — The wall time in seconds per task chain.task_chain_runner_call_prefixOptional[str] — Arbitrary bash command that is placed right before the Python call that launches the local task chain runners on the remote sites. Useful if these have to be launched with special MPI commands for example.custom_mpi_templateOptional[str] — Custom MPI call for calls to Salvus within the task chain.max_concurrent_chainsOptional[int] — Maximum number of concurrent chains.
Methods
from_json()
from_json()def from_json(d: Dict) -> Any:
...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dDict — Dictionary containing its init parameters and a few other things.
Returns Any
to_json()
to_json()def to_json(self, external_file_hash: Optional[str] = None) -> Dict:
...Serialize the object to dictionary that can be written to JSON.
Parameters
external_file_hashOptional[str] — Hash of any external files associated with this object. Can be passed here in which case it will be stored in a centralized location in the JSON file.
Returns Dict