perun.comm
Comm module.
Module Contents
Classes
Wrapper around MPI COMM_WORLD. Does nothing if MPI is not initialized. |
Attributes
- perun.comm.log
- class perun.comm.Comm
Wrapper around MPI COMM_WORLD. Does nothing if MPI is not initialized.
- _mpi_init()
- gather(obj: Any, root: int = 0) List[Any] | None
MPI gather operation.
Parameters
- objAny
Object to be gathered.
- rootint, optional
Reciever rank, by default 0
Returns
- Optional[List[Any]]
List with the gathered objects.
- allgather(obj: Any) List[Any]
MPI allgather operation.
Parameters
- objAny
Object to be gathered.
Returns
- List[Any]
List with the gathered objects.
- bcast(obj: Any, root: int = 0) Any
MPI broadcast operation.
Parameters
- objAny
Object to be broadcasted.
- rootint, optional
Sender rank, by default 0
Returns
- Any
Broadcasted object.
- barrier()
MPI barrier operation.
- Abort(errorcode: int)
MPI Abort operation.
- gather_from_ranks(obj: Any, ranks: List[int], root: int = 0) List[Any] | None
Collect python objects from specific ranks at the determined root.
Parameters
- objAny
Object to be collected.
- ranksList[int]
List of ranks that need to send the object.
- rootint, optional
Reciever rank, by default 0
Returns
- Optional[List[Any]]
List with the gathered objects.