Class Communicator


  • @Deprecated
    public class Communicator
    extends java.lang.Object
    Deprecated.
    the no.uib.cipr.matrix.distributed package has been deprecated because of a number of hard to fix concurrency bugs. It is distributed only for backwards compatibility, but is not recommended. The utility of this package is questionable, as it does not allow distribution of computation between JVMs or across a network. For many people, distributed computing of multiple matrices can be achieved at a user-level through the JPPF Framework. Users who need to deal with few very large matrices may wish to implement their own storage classes and solvers using JPPF, but this will not be supported directly in matrix-toolkits-java.
    Inter-thread communications. Supports point-to-point communications using barriers between the threads. Construct it using the CollectiveCommunications.createCommunicator method.

    All Objects which are sent and recieved are arrays (for instance, double[] or int[]), and the types must be compatible. It follows that Object[] is an array of native arrays, such as int[][].

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void allGather​(java.lang.Object sendbuf, java.lang.Object[] recvbuf)
      Deprecated.
      Gathers data from all tasks and distribute it to all.
      void allReduce​(java.lang.Object sendbuf, java.lang.Object recvbuf, Reduction op)
      Deprecated.
      Combines values from all processes and distribute the result back to all processes.
      void allToAll​(java.lang.Object[] sendbuf, java.lang.Object[] recvbuf)
      Deprecated.
      Sends data from all to all processes.
      void await​(java.util.concurrent.Future f)
      Deprecated.
      Waits for the given asynchronous operation to finish
      void await​(java.util.concurrent.Future[] future)
      Deprecated.
      Waits for the given asynchronous operations to finish
      void barrier()
      Deprecated.
      Blocks until all process have reached this routine.
      void broadcast​(java.lang.Object buffer, int root)
      Deprecated.
      Broadcasts a message from the process with rank "root" to all other processes of the group.
      void gather​(java.lang.Object sendbuf, java.lang.Object[] recvbuf, int root)
      Deprecated.
      Gathers together values from a group of processes.
      java.util.concurrent.Future irecv​(java.lang.Object data, int peer)
      Deprecated.
       
      java.util.concurrent.Future irecv​(java.lang.Object data, int offset, int length, int peer)
      Deprecated.
       
      java.util.concurrent.Future isend​(java.lang.Object data, int peer)
      Deprecated.
       
      java.util.concurrent.Future isend​(java.lang.Object data, int offset, int length, int peer)
      Deprecated.
       
      int rank()
      Deprecated.
      Rank of this thread in the collective
      void recv​(java.lang.Object data, int peer)
      Deprecated.
       
      void recv​(java.lang.Object data, int offset, int length, int peer)
      Deprecated.
      Receives data[offset:offset+length] from peer
      void reduce​(java.lang.Object sendbuf, java.lang.Object recvbuf, Reduction op, int root)
      Deprecated.
      Reduces values on all processes to a single value
      void scatter​(java.lang.Object[] sendbuf, java.lang.Object recvbuf, int root)
      Deprecated.
      Sends data from one task to all other tasks in a group.
      void send​(java.lang.Object data, int peer)
      Deprecated.
       
      void send​(java.lang.Object data, int offset, int length, int peer)
      Deprecated.
      Sends data[offset:offset+length] to peer
      int size()
      Deprecated.
      Size of the collective
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • rank

        public int rank()
        Deprecated.
        Rank of this thread in the collective
      • size

        public int size()
        Deprecated.
        Size of the collective
      • allGather

        public void allGather​(java.lang.Object sendbuf,
                              java.lang.Object[] recvbuf)
        Deprecated.
        Gathers data from all tasks and distribute it to all.

        Row corresponds to ranks, and columns corresponds to data.

        Input:

        A1      
        B1      
        C1      
        D1      

        Output:

        A1 B1 C1 D1
        A1 B1 C1 D1
        A1 B1 C1 D1
        A1 B1 C1 D1
      • allReduce

        public void allReduce​(java.lang.Object sendbuf,
                              java.lang.Object recvbuf,
                              Reduction op)
        Deprecated.
        Combines values from all processes and distribute the result back to all processes.
      • allToAll

        public void allToAll​(java.lang.Object[] sendbuf,
                             java.lang.Object[] recvbuf)
        Deprecated.
        Sends data from all to all processes.

        Row corresponds to ranks, and columns corresponds to data.

        Input:

        A1 A2 A3 A4
        B1 B2 B3 B4
        C1 C2 C3 C4
        D1 D2 D3 D4

        Output:

        A1 B1 C1 D1
        A2 B2 C2 D2
        A3 B3 C3 D3
        A4 B4 C4 D4
      • barrier

        public void barrier()
        Deprecated.
        Blocks until all process have reached this routine.
      • broadcast

        public void broadcast​(java.lang.Object buffer,
                              int root)
        Deprecated.
        Broadcasts a message from the process with rank "root" to all other processes of the group.

        Row corresponds to ranks, and columns corresponds to data.

        Input:

        A1      
               
               
               

        Output:

        A1      
        A1      
        A1      
        A1      
      • gather

        public void gather​(java.lang.Object sendbuf,
                           java.lang.Object[] recvbuf,
                           int root)
        Deprecated.
        Gathers together values from a group of processes.

        Row corresponds to ranks, and columns corresponds to data.

        Input:

        A1      
        A2      
        A3      
        A4      

        Output:

        A1 A2 A3 A4
               
               
               
      • reduce

        public void reduce​(java.lang.Object sendbuf,
                           java.lang.Object recvbuf,
                           Reduction op,
                           int root)
        Deprecated.
        Reduces values on all processes to a single value
      • scatter

        public void scatter​(java.lang.Object[] sendbuf,
                            java.lang.Object recvbuf,
                            int root)
        Deprecated.
        Sends data from one task to all other tasks in a group.

        Row corresponds to ranks, and columns corresponds to data.

        Input:

        A1 A2 A3 A4
               
               
               

        Output:

        A1      
        A2      
        A3      
        A4      
      • send

        public void send​(java.lang.Object data,
                         int offset,
                         int length,
                         int peer)
        Deprecated.
        Sends data[offset:offset+length] to peer
      • recv

        public void recv​(java.lang.Object data,
                         int offset,
                         int length,
                         int peer)
        Deprecated.
        Receives data[offset:offset+length] from peer
      • isend

        public java.util.concurrent.Future isend​(java.lang.Object data,
                                                 int offset,
                                                 int length,
                                                 int peer)
        Deprecated.
      • irecv

        public java.util.concurrent.Future irecv​(java.lang.Object data,
                                                 int offset,
                                                 int length,
                                                 int peer)
        Deprecated.
      • send

        public void send​(java.lang.Object data,
                         int peer)
        Deprecated.
      • recv

        public void recv​(java.lang.Object data,
                         int peer)
        Deprecated.
      • isend

        public java.util.concurrent.Future isend​(java.lang.Object data,
                                                 int peer)
        Deprecated.
      • irecv

        public java.util.concurrent.Future irecv​(java.lang.Object data,
                                                 int peer)
        Deprecated.
      • await

        public void await​(java.util.concurrent.Future[] future)
        Deprecated.
        Waits for the given asynchronous operations to finish
      • await

        public void await​(java.util.concurrent.Future f)
        Deprecated.
        Waits for the given asynchronous operation to finish