Version:

salvus.flow.executors.task_chain.task_chain_site_config

salvus.flow.executors.task_chain.task_chain_site_config salvus flow executors task_chain task_chain_site_config
Task chain specific site configuration.

Classes

TaskChainSiteConfig

Keeps track of the initial arguments passed to an objects and can later on serialize them to JSON document.
It will only consider whatever is passed in the init.
Site configuration for a task chain runner site.
SIGNATURE
class 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: _OptionalListOfStringDicts = None,
        memory_per_rank_in_MB: float | None = None,
        wall_time_in_seconds_per_task_chain: int | None = None,
        task_chain_runner_call_prefix: str | None = None,
        custom_mpi_template: str | None = None,
    ): ...
ARGUMENTS
Required
site_name
Type:str
Description:
Name of the site.
Required
number_of_parallel_workers
Type:int
Description:
The number of parallel task chain workers on the site.
Required
ranks_per_salvus_simulation
Type:int
Description:
The number of ranks for a salvus simulation in each parallel task chain runner.
Required
max_threads_per_worker
Type:int
Description:
The number of threads per worker. For GPU Salvus runs best set this to a multiple of the number of ranks per Salvus simulation.
Required
shared_file_system
Type:bool
Description:
True if the filesystem is shared between the runner and the controller.
Optional
environment_variables_per_worker
Type:_OptionalListOfStringDicts
Default value:None
Description:
One set of environment variables per parallel worker. That way the different workers can for example use different GPUs.
Optional
memory_per_rank_in_MB
Type:float | None
Default value:None
Description:
The memory per rank in megabytes.
Optional
wall_time_in_seconds_per_task_chain
Type:int | None
Default value:None
Description:
The wall time in seconds per task chain.
Optional
task_chain_runner_call_prefix
Type:str | None
Default value:None
Description:
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.
Optional
custom_mpi_template
Type:str | None
Default value:None
Description:
Custom MPI call for calls to Salvus within the task chain.

Class Methods

TaskChainSiteConfig.from_json()
Recreate the object from a dictionary serialization of its initialization parameters.
SIGNATURE
def from_json(d: builtins.dict) -> Any: ...
ARGUMENTS
Required
d
Type:builtins.dict
Description:
Dictionary containing its init parameters and a few other things.

Methods

TaskChainSiteConfig.to_json()
Serialize the object to a dictionary that can be written to JSON.
SIGNATURE
def to_json(
    self,
    external_file_hash: types = None,
    timer: types = None,
    log_to_logger: bool = False,
    comm: types = None,
) -> builtins.dict: ...
ARGUMENTS
Optional
external_file_hash
Type:types
Default value:None
Description:
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.
Optional
timer
Type:types
Default value:None
Description:
Execution timer.
Optional
log_to_logger
Type:bool
Default value:False
Description:
Log timings to the logger.
Optional
comm
Type:types
Default value:None
Description:
MPI communicator, if any.
PAGE CONTENTS