Mondaic
This API reference is not for the latest stable Salvus version.

salvus.flow.sites.task_chain.task_chain_site_config

Task chain specific site configuration.

Classes

TaskChainSiteConfig

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: 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_name str — Name of the site.
  • number_of_parallel_workers int — The number of parallel task chain workers on the site.
  • ranks_per_salvus_simulation int — The number of ranks for a salvus simulation in each parallel task chain runner.
  • max_threads_per_worker int — The number of threads per worker - this is currently not used.
  • shared_file_system bool — True if the filesystem is shared between the runner and the controller.
  • environment_variables_per_worker Optional[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_MB Optional[float] — The memory per rank in megabytes.
  • wall_time_in_seconds_per_task_chain Optional[int] — The wall time in seconds per task chain.
  • task_chain_runner_call_prefix Optional[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_template Optional[str] — Custom MPI call for calls to Salvus within the task chain.
  • max_concurrent_chains Optional[int] — Maximum number of concurrent chains.
Methods
from_json()
def from_json(d: Dict) -> Any:
    ...

Recreate the object from a dictionary serialization of its initialization parameters.

Parameters
  • d Dict — Dictionary containing its init parameters and a few other things.
Returns Any
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_hash Optional[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