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
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: _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,
): ...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.
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. For GPU Salvus runs best set this to a multiple of the number of ranks per Salvus simulation.shared_file_systembool — True if the filesystem is shared between the runner and the controller.environment_variables_per_worker_OptionalListOfStringDicts — One set of environment variables per parallel worker. That way the different workers can for example use different GPUs.memory_per_rank_in_MBfloat | None — The memory per rank in megabytes.wall_time_in_seconds_per_task_chainint | None — The wall time in seconds per task chain.task_chain_runner_call_prefixstr | None — 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_templatestr | None — Custom MPI call for calls to Salvus within the task chain.
Methods
from_json()
from_json()def from_json(d: builtins.dict) -> Any: ...Recreate the object from a dictionary serialization of its initialization parameters.
Parameters
dbuiltins.dict — Dictionary containing its init parameters and a few other things.
Returns Any
to_json()
to_json()def to_json(
self,
external_file_hash: types = None,
timer: types = None,
log_to_logger: bool = False,
comm: types = None,
) -> builtins.dict: ...Serialize the object to a dictionary that can be written to JSON.
Parameters
external_file_hashtypes — 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.timertypes — Execution timer.log_to_loggerbool — Log timings to the logger.commtypes — MPI communicator, if any.
Returns builtins.dict