executorlib.standalone.interactive.spawner.BaseSpawner#
- class executorlib.standalone.interactive.spawner.BaseSpawner(cwd: str | None = None, cores: int = 1, worker_id: int = 0, openmpi_oversubscribe: bool = False)[source]#
Bases:
ABC- __init__(cwd: str | None = None, cores: int = 1, worker_id: int = 0, openmpi_oversubscribe: bool = False)[source]#
Base class for interface implementations.
- Parameters:
cwd (str) – The current working directory.
cores (int, optional) – The number of cores to use. Defaults to 1.
openmpi_oversubscribe (bool, optional) – Whether to oversubscribe the cores. Defaults to False.
worker_id (int) – The worker ID. Defaults to 0.
Methods
__init__([cwd, cores, worker_id, ...])Base class for interface implementations.
bootup(command_lst[, stop_function])Method to start the interface.
poll()Method to check if the interface is running.
shutdown([wait])Method to shutdown the interface.
- abstract bootup(command_lst: list[str], stop_function: Callable | None = None) bool[source]#
Method to start the interface.
- Parameters:
command_lst (list[str]) – The command list to execute.
stop_function (Callable) – Function to stop the interface.
- Returns:
Whether the interface was successfully started.
- Return type:
bool