Class MpjImpl

  • All Implemented Interfaces:
    MpiFacade

    public class MpjImpl
    extends Object
    implements MpiFacade
    Implements MpiFacade via MPJ Express parallelization
    Author:
    , Christoph Schimeczek, A. Achraf El Ghazi
    • Constructor Detail

      • MpjImpl

        public MpjImpl()
    • Method Detail

      • initialise

        public String[] initialise​(String[] args)
        Description copied from interface: MpiFacade
        Initialises MPI after its instantiation
        Specified by:
        initialise in interface MpiFacade
        Parameters:
        args - Parameter for MPI and main program
        Returns:
        Parameters for main program
      • getRank

        public int getRank()
        Specified by:
        getRank in interface MpiFacade
        Returns:
        MPI rank of this process
      • getSize

        public int getSize()
        Specified by:
        getSize in interface MpiFacade
        Returns:
        Number of MPI processes
      • broadcastBytes

        public byte[] broadcastBytes​(byte[] data,
                                     int source)
        Description copied from interface: MpiFacade
        Copies an array of Bytes from source process to all other processes
        Specified by:
        broadcastBytes in interface MpiFacade
        Parameters:
        data - byte array to be copied
        source - processID hosting the original byte array
        Returns:
        On all processes: The copied byte array
      • sendBytesTo

        public void sendBytesTo​(byte[] data,
                                int target,
                                int tag)
        Description copied from interface: MpiFacade
        Sends an array of Bytes to the specified target process with given tag;
        This method blocks, does not return until the receiver has accepted the message.
        Specified by:
        sendBytesTo in interface MpiFacade
        Parameters:
        data - byte array to be send
        target - processID to receive the data
        tag - data stream identifier
      • receiveBytesWithTag

        public byte[] receiveBytesWithTag​(int tag)
        Description copied from interface: MpiFacade
        Receive an array of Bytes with a given tag
        Specified by:
        receiveBytesWithTag in interface MpiFacade
        Parameters:
        tag - data stream identifier
        Returns:
        received byte array
      • iSendBytesTo

        public MpjRequest iSendBytesTo​(byte[] data,
                                       int target,
                                       int tag)
        Description copied from interface: MpiFacade
        Sends an array of Bytes to the specified target process with given tag;
        This method does not block, i.e. returns immediately after dispatching the data, not confirming its receival.
        Specified by:
        iSendBytesTo in interface MpiFacade
        Parameters:
        data - byte array to be send
        target - processID to receive the data
        tag - data stream identifier
        Returns:
        Request object that allows waiting for the completion of the transmission
      • invokeFinalize

        public void invokeFinalize()
        Description copied from interface: MpiFacade
        Finalises MPI
        Specified by:
        invokeFinalize in interface MpiFacade