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 TWSChannel
wId
- 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 TWSChannel
wId
- worker id to listen toe
- the graph edge to receive fromcallback
- callback for message completionsreceiveBuffers
- the list of receive bufferspublic void close()
TWSChannel
close
in interface TWSChannel
public boolean isComplete()
TWSChannel
isComplete
in interface TWSChannel
public void progressSends()
TWSChannel
progressSends
in interface TWSChannel
public void progressReceives(int receiveGroupIndex)
TWSChannel
progressReceives
in interface TWSChannel
public void progress()
progress
in interface TWSChannel
public java.nio.ByteBuffer createBuffer(int capacity)
TWSChannel
createBuffer
in interface TWSChannel
capacity
- capacitypublic void releaseBuffers(int wId, int e)
releaseBuffers
in interface TWSChannel
wId
- worker ide
- edgepublic void reInit(java.util.List<JobMasterAPI.WorkerInfo> restartedWorkers)
TWSChannel
reInit
in interface TWSChannel