Package de.dlr.gitlab.fame.mpi
Interface MpiFacade
-
- All Known Implementing Classes:
MpjImpl,OmpiImpl,SingleCoreImpl
public interface MpiFacadeServes as facade to the MessagePassingInterface (MPI)- Author:
- Christoph Schimeczek, Achraf El Ghazi
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMpiFacade.MpiMode
-
Method Summary
All Methods Instance Methods Abstract 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 MPIMpiRequestFacadeiSendBytesTo(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
MpiFacade.MpiMode getMode()
- Returns:
- MPI mode associated with the MpiFacade implementation
-
initialise
String[] initialise(String[] args)
Initialises MPI after its instantiation- Parameters:
args- Parameter for MPI and main program- Returns:
- Parameters for main program
-
getRank
int getRank()
- Returns:
- MPI rank of this process
-
getSize
int getSize()
- Returns:
- Number of MPI processes
-
broadcastBytes
byte[] broadcastBytes(byte[] data, int source)Copies an array of Bytes from source process to all other processes- Parameters:
data- byte array to be copiedsource- processID hosting the original byte array- Returns:
- On all processes: The copied byte array
-
sendBytesTo
void 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.- Parameters:
data- byte array to be sendtarget- processID to receive the datatag- data stream identifier
-
receiveBytesWithTag
byte[] receiveBytesWithTag(int tag)
Receive an array of Bytes with a given tag- Parameters:
tag- data stream identifier- Returns:
- received byte array
-
iSendBytesTo
MpiRequestFacade 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.- 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
void invokeFinalize()
Finalises MPI
-
-