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.MpiMode
getMode()
int
getRank()
int
getSize()
String[]
initialise(String[] args)
Initialises MPI after its instantiationvoid
invokeFinalize()
Finalises MPIMpjRequest
iSendBytesTo(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 tagvoid
sendBytesTo(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:MpiFacade
Initialises MPI after its instantiation- Specified by:
initialise
in 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:MpiFacade
Copies an array of Bytes from source process to all other processes- Specified by:
broadcastBytes
in 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: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 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:MpiFacade
Receive an array of Bytes with a given tag- Specified by:
receiveBytesWithTag
in interfaceMpiFacade
- 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 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:MpiFacade
Finalises MPI- Specified by:
invokeFinalize
in interfaceMpiFacade
-
-