perun.coordination¶
Coordination module.
Attributes¶
Functions¶
|
Return a dictionary with all the host names with each MPI rank in them. |
|
Assings each mpi rank a sensor based on available backends and Host to rank mapping. |
Module Contents¶
- perun.coordination.getHostRankDict(comm: perun.comm.Comm, hostname: str) dict[str, list[int]][source]¶
Return a dictionary with all the host names with each MPI rank in them.
- Parameters:
comm (Comm) – MPI Communicator
hostname (str) – Local rank Hostname
- Returns:
Global host and mpi ranks dictionary.
- Return type:
dict[str, list[int]]
- perun.coordination.assignSensors(host_rank_dict: dict[str, list[int]], g_available_sensors: list[dict[str, tuple]]) list[dict[str, tuple]][source]¶
Assings each mpi rank a sensor based on available backends and Host to rank mapping.
- Parameters:
host_rank_dict (dict[str, list[int]]) – Host to rank mapping.
g_available_sensors (list[dict[str, tuple]]) – List of available sensors for each backend for each rank.
- Returns:
List with apointed backend and sensors for each MPI rank.
- Return type:
list[dict[str, tuple]]