Package mpi

Class GraphComm

  • All Implemented Interfaces:
    java.lang.Cloneable, Freeable

    public final class GraphComm
    extends Intracomm
    Communicator with graph structure.
    • Constructor Detail

      • GraphComm

        protected GraphComm​(long[] commRequest)
    • Method Detail

      • clone

        public GraphComm clone()
        Duplicates this communicator.

        Java binding of MPI_COMM_DUP.

        It is recommended to use dup() instead of clone() because the last can't throw an MPIException.

        Overrides:
        clone in class Intracomm
        Returns:
        copy of this communicator
      • dup

        public GraphComm dup()
                      throws MPIException
        Duplicates this communicator.

        Java binding of MPI_COMM_DUP.

        Overrides:
        dup in class Intracomm
        Returns:
        copy of this communicator
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • iDup

        public GraphComm iDup()
                       throws MPIException
        Duplicates this communicator.

        The new communicator can't be used before the operation completes. The request object must be obtained calling Comm.getRequest().

        Java binding of MPI_COMM_IDUP.

        Overrides:
        iDup in class Intracomm
        Returns:
        copy of this communicator
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • dupWithInfo

        public GraphComm dupWithInfo​(Info info)
                              throws MPIException
        Duplicates this communicator with the info object used in the call.

        Java binding of MPI_COMM_DUP_WITH_INFO.

        Overrides:
        dupWithInfo in class Intracomm
        Parameters:
        info - info object to associate with the new communicator
        Returns:
        copy of this communicator
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • getDims

        public GraphParms getDims()
                           throws MPIException
        Returns graph topology information.

        Java binding of the MPI operations MPI_GRAPHDIMS_GET and MPI_GRAPH_GET.

        The number of nodes and number of edges can be extracted from the sizes of the index and edges fields of the returned object.

        Returns:
        object defining node degress and edges of graph
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • getNeighbors

        public int[] getNeighbors​(int rank)
                           throws MPIException
        Provides adjacency information for general graph topology.

        Java binding of the MPI operations MPI_GRAPH_NEIGHBORS_COUNT and MPI_GRAPH_NEIGHBORS.

        The number of neighbors can be extracted from the size of the result.

        Parameters:
        rank - rank of a process in the group of this communicator
        Returns:
        array of ranks of neighboring processes to one specified
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • getDistGraphNeighbors

        public DistGraphNeighbors getDistGraphNeighbors()
                                                 throws MPIException
        Gets the adjacency information for a distributed graph topology.
        Returns:
        adjacency information for a distributed graph topology
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.
      • map

        public int map​(int[] index,
                       int[] edges)
                throws MPIException
        Compute an optimal placement.

        Java binding of the MPI operation MPI_GRAPH_MAP.

        The number of nodes is taken to be size of the index argument.

        Parameters:
        index - node degrees
        edges - graph edges
        Returns:
        reordered rank of calling process
        Throws:
        MPIException - Signals that an MPI exception of some sort has occurred.