Package de.dlr.gitlab.fame.mpi
Class MpjImpl
- java.lang.Object
-
- de.dlr.gitlab.fame.mpi.MpjImpl
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface de.dlr.gitlab.fame.mpi.MpiFacade
MpiFacade.MpiMode
-
-
Constructor Summary
Constructors Constructor Description MpjImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]broadcastBytes(byte[] data, int source)Copies an array of Bytes from source process to all other processesMpiFacade.MpiModegetMode()intgetRank()intgetSize()String[]initialise(String[] args)Initialises MPI after its instantiationvoidinvokeFinalize()Finalises MPIMpjRequestiSendBytesTo(byte[] data, int target, int tag)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.byte[]receiveBytesWithTag(int tag)Receive an array of Bytes with a given tagvoidsendBytesTo(byte[] data, int target, int tag)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.
-
-
-
Method Detail
-
getMode
public MpiFacade.MpiMode getMode()
-
initialise
public String[] initialise(String[] args)
Description copied from interface:MpiFacadeInitialises MPI after its instantiation- Specified by:
initialisein interfaceMpiFacade- Parameters:
args- Parameter for MPI and main program- Returns:
- Parameters for main program
-
getRank
public int getRank()
-
getSize
public int getSize()
-
broadcastBytes
public byte[] broadcastBytes(byte[] data, int source)Description copied from interface:MpiFacadeCopies an array of Bytes from source process to all other processes- Specified by:
broadcastBytesin interfaceMpiFacade- Parameters:
data- byte array to be copiedsource- 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:MpiFacadeSends 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:
sendBytesToin interfaceMpiFacade- Parameters:
data- byte array to be sendtarget- processID to receive the datatag- data stream identifier
-
receiveBytesWithTag
public byte[] receiveBytesWithTag(int tag)
Description copied from interface:MpiFacadeReceive an array of Bytes with a given tag- Specified by:
receiveBytesWithTagin interfaceMpiFacade- Parameters:
tag- data stream identifier- Returns:
- received byte array
-
iSendBytesTo
public MpjRequest iSendBytesTo(byte[] data, int target, int tag)
Description copied from interface:MpiFacadeSends 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:
iSendBytesToin interfaceMpiFacade- Parameters:
data- byte array to be sendtarget- processID to receive the datatag- data stream identifier- Returns:
- Request object that allows waiting for the completion of the transmission
-
invokeFinalize
public void invokeFinalize()
Description copied from interface:MpiFacadeFinalises MPI- Specified by:
invokeFinalizein interfaceMpiFacade
-
-