perun.comm ========== .. py:module:: perun.comm .. autoapi-nested-parse:: Comm module. Attributes ---------- .. autoapisummary:: perun.comm.log Classes ------- .. autoapisummary:: perun.comm.Comm Module Contents --------------- .. py:data:: log .. py:class:: Comm Wrapper around MPI COMM_WORLD. Does nothing if MPI is not initialized. .. py:method:: Get_rank() -> int Get local MPI rank. :returns: MPI Rank :rtype: int .. py:method:: Get_size() -> int MPI World size. :returns: World Size :rtype: int .. py:method:: gather(obj: Any, root: int = 0) -> Optional[List[Any]] MPI gather operation. :param obj: Object to be gathered. :type obj: Any :param root: Reciever rank, by default 0 :type root: int, optional :returns: List with the gathered objects. :rtype: Optional[List[Any]] .. py:method:: allgather(obj: Any) -> List[Any] MPI allgather operation. :param obj: Object to be gathered. :type obj: Any :returns: List with the gathered objects. :rtype: List[Any] .. py:method:: bcast(obj: Any, root: int = 0) -> Any MPI broadcast operation. :param obj: Object to be broadcasted. :type obj: Any :param root: Sender rank, by default 0 :type root: int, optional :returns: Broadcasted object. :rtype: Any .. py:method:: barrier() -> None MPI barrier operation. .. py:method:: Abort(errorcode: int) -> None MPI Abort operation. .. py:method:: gather_from_ranks(obj: Any, ranks: List[int], root: int = 0) -> Optional[List[Any]] Collect python objects from specific ranks at the determined root. :param obj: Object to be collected. :type obj: Any :param ranks: List of ranks that need to send the object. :type ranks: List[int] :param root: Reciever rank, by default 0 :type root: int, optional :returns: List with the gathered objects. :rtype: Optional[List[Any]] .. py:method:: check_available_ranks() -> List[int] Return an array with all the ranks that are capable of responding to a single send/recv. :returns: List with responsive MPI ranks. :rtype: List[int]