executorlib.standalone.interactive.communication.interface_bootup

executorlib.standalone.interactive.communication.interface_bootup#

executorlib.standalone.interactive.communication.interface_bootup(command_lst: list[str], connections, hostname_localhost: bool | None = None, log_obj_size: bool = False, worker_id: int | None = None, stop_function: Callable | None = None) SocketInterface[source]#

Start interface for ZMQ communication

Parameters:
  • command_lst (list) – List of commands as strings

  • connections (executorlib.shared.spawner.BaseSpawner) – Interface to start parallel process, like MPI, SLURM or Flux

  • hostname_localhost (boolean) – use localhost instead of the hostname to establish the zmq connection. In the context of an HPC cluster this essential to be able to communicate to an Executor running on a different compute node within the same allocation. And in principle any computer should be able to resolve that their own hostname points to the same address as localhost. Still MacOS >= 12 seems to disable this look up for security reasons. So on MacOS it is required to set this option to true

  • log_obj_size (boolean) – Enable debug mode which reports the size of the communicated objects.

  • worker_id (int) – Communicate the worker which ID was assigned to it for future reference and resource distribution.

  • stop_function (Callable) – Function to stop the interface.

Returns:

socket interface for zmq communication

Return type:

executorlib.shared.communication.SocketInterface