Class Communicator

java.lang.Object
no.uib.cipr.matrix.distributed.Communicator

@Deprecated public class Communicator extends 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

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

    Methods inherited from class java.lang.Object

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

    • 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(Object sendbuf, 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(Object sendbuf, Object recvbuf, Reduction op)
      Deprecated.
      Combines values from all processes and distribute the result back to all processes.
    • allToAll

      public void allToAll(Object[] sendbuf, 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(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(Object sendbuf, 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(Object sendbuf, Object recvbuf, Reduction op, int root)
      Deprecated.
      Reduces values on all processes to a single value
    • scatter

      public void scatter(Object[] sendbuf, 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(Object data, int offset, int length, int peer)
      Deprecated.
      Sends data[offset:offset+length] to peer
    • recv

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

      public Future isend(Object data, int offset, int length, int peer)
      Deprecated.
    • irecv

      public Future irecv(Object data, int offset, int length, int peer)
      Deprecated.
    • send

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

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

      public Future isend(Object data, int peer)
      Deprecated.
    • irecv

      public Future irecv(Object data, int peer)
      Deprecated.
    • await

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

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