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
perun.coordination.getHostRankDict(comm: perun.comm.Comm, hostname: str) Dict[str, List[int]]

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

Parameters

commComm

MPI Communicator

hostnamestr

Local rank Hostname

Returns

Dict[str, List[int]]

Global host and mpi ranks dictionary.

perun.coordination.assignSensors(host_rank_dict: Dict[str, List[int]], g_available_sensors: List[Dict[str, Tuple]]) List[Dict[str, Tuple]]

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

Parameters

host_rank_dictDict[str, List[int]]

Host to rank mapping.

g_available_sensorsList[Dict[str, Tuple]]

List of available sensors for each backend for each rank.

Returns

List[Dict[str, Tuple]]

List with apointed backend and sensors for each MPI rank.