perun.coordination

Coordination module.

Attributes

log

Functions

getHostRankDict(→ Dict[str, List[int]])

Return a dictionary with all the host names with each MPI rank in them.

assignSensors(→ List[Dict[str, Tuple]])

Assings each mpi rank a sensor based on available backends and Host to rank mapping.

Module Contents

perun.coordination.log[source]
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]]