public class TWSMPIChannel extends java.lang.Object implements TWSChannel
The transport threads doesn't handle the message serialization and it is left to the application level.
| Constructor and Description |
|---|
TWSMPIChannel(Config config,
IWorkerController wController)
Create the mpi channel
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the channel
|
java.nio.ByteBuffer |
createBuffer(int capacity)
Create a buffer
|
boolean |
isComplete()
Check weather we have any pending sends
|
void |
progress()
Progress the communications that are pending
|
void |
progressReceives(int receiveGroupIndex)
Progress only receives belonging to a group
|
void |
progressSends()
Progress only the sends
|
boolean |
receiveMessage(int group,
int wId,
int e,
ChannelListener callback,
java.util.Queue<DataBuffer> receiveBuffers)
Register our interest to receive messages from particular rank using a stream
|
void |
reInit(java.util.List<JobMasterAPI.WorkerInfo> restartedWorkers)
re-initialize the channel with restarted workers
|
void |
releaseBuffers(int wId,
int e)
Close a worker id with edge
|
boolean |
sendMessage(int wId,
ChannelMessage message,
ChannelListener callback)
Send messages to the particular id
|
public TWSMPIChannel(Config config, IWorkerController wController)
config - configurationwController - controllerpublic boolean sendMessage(int wId,
ChannelMessage message,
ChannelListener callback)
sendMessage in interface TWSChannelwId - id to be used for sending messagesmessage - the messagecallback - callback for message completionspublic boolean receiveMessage(int group,
int wId,
int e,
ChannelListener callback,
java.util.Queue<DataBuffer> receiveBuffers)
receiveMessage in interface TWSChannelwId - worker id to listen toe - the graph edge to receive fromcallback - callback for message completionsreceiveBuffers - the list of receive bufferspublic void close()
TWSChannelclose in interface TWSChannelpublic boolean isComplete()
TWSChannelisComplete in interface TWSChannelpublic void progressSends()
TWSChannelprogressSends in interface TWSChannelpublic void progressReceives(int receiveGroupIndex)
TWSChannelprogressReceives in interface TWSChannelpublic void progress()
progress in interface TWSChannelpublic java.nio.ByteBuffer createBuffer(int capacity)
TWSChannelcreateBuffer in interface TWSChannelcapacity - capacitypublic void releaseBuffers(int wId,
int e)
releaseBuffers in interface TWSChannelwId - worker ide - edgepublic void reInit(java.util.List<JobMasterAPI.WorkerInfo> restartedWorkers)
TWSChannelreInit in interface TWSChannel