|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object xdev.Device
public abstract class Device
xdev is an abstract class representing an abstract device. The implementations of this abstract class would provide various different communication protocols that can be used by MPJ at the higher-levels. The aim is to allow, flexible swapping of communication protocols, and also to keep the API simple and small, thus minimizing the overall development time of the device.
Instead of using integer ranks as arguments to send/recv, xdev uses
xdev.ProcessID
as arguments to send/recv.
This essentially means that
xdev doesnot deal with the higher level abstractions of MPI, like
groups, communicators, and contexts -- it only focuses on providing
communication methods, on top of which these higher abstractions of
MPI can be implemented.
Field Summary | |
---|---|
static int |
ANY_SOURCE
A wild-card that can be used with the recv methods. |
static ProcessID |
ANY_SRC
A wild-card for ANY_SOURCE at xdev level. |
static int |
ANY_TAG
A wild-card that can be used with the recv method to receive the message from any source within the communicator. |
java.lang.String |
deviceName
|
Constructor Summary | |
---|---|
Device()
|
Method Summary | |
---|---|
abstract void |
finish()
This method shutdowns the device. |
abstract int |
getRecvOverhead()
|
abstract int |
getSendOverhead()
|
abstract ProcessID |
id()
This method returns the id of the current process |
abstract ProcessID[] |
init(java.lang.String[] args)
Initialize the xdev device. |
abstract Status |
iprobe(ProcessID srcID,
int tag,
int context)
This method is the non-blocking probe. |
abstract Request |
irecv(Buffer buf,
ProcessID srcID,
int tag,
int context,
Status status)
This method is the non-blocking recv. |
abstract Request |
isend(Buffer buf,
ProcessID destID,
int tag,
int context)
This method is the non-blocking send using standard-mode. |
abstract Request |
issend(Buffer buf,
ProcessID destID,
int tag,
int context)
This method is the non-blocking send using synchronous-mode. |
static Device |
newInstance(java.lang.String dev)
This method returns an instance of xdev specified by the argument. |
abstract Request |
peek()
|
abstract Status |
probe(ProcessID srcID,
int tag,
int context)
This method is the blocking probe. |
abstract Status |
recv(Buffer buf,
ProcessID srcID,
int tag,
int context)
This method is the blocking recv. |
abstract void |
send(Buffer buf,
ProcessID destID,
int tag,
int context)
This method is the blocking send using standard-mode. |
abstract void |
ssend(Buffer buf,
ProcessID destID,
int tag,
int context)
This method is the blocking send using synchronous-mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int ANY_SOURCE
public java.lang.String deviceName
public static ProcessID ANY_SRC
xdev.ProcessID
object with UUID set to random UUID , and rank set to
ANY_SRC (-2)
public static final int ANY_TAG
Constructor Detail |
---|
public Device()
Method Detail |
---|
public static Device newInstance(java.lang.String dev) throws XDevException
dev
- The name of the xdev Device. The one for Java New I/O is
named 'niodev'. The name of the device is provided to xdev
by MPJ runtime, which in turn gets it from 'mpjrun' script.
XDevException
- If there is no corresponding device to the string
argument provided to this methodpublic abstract ProcessID[] init(java.lang.String[] args) throws XDevException
args
- Argument array.
XDevException
- If there is an error initializing the devicepublic abstract int getSendOverhead()
public abstract int getRecvOverhead()
public abstract ProcessID id()
public abstract void finish() throws XDevException
XDevException
public abstract Request isend(Buffer buf, ProcessID destID, int tag, int context) throws XDevException
buf
- mpjbuf.Buffer
object containing the datadestID
- ProcessID
of the destination processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract void send(Buffer buf, ProcessID destID, int tag, int context) throws XDevException
buf
- mpjbuf.Buffer
object containing the datadestID
- ProcessID
of the destination processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Request issend(Buffer buf, ProcessID destID, int tag, int context) throws XDevException
buf
- mpjbuf.Buffer
object containing the datadestID
- ProcessID
of the destination processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract void ssend(Buffer buf, ProcessID destID, int tag, int context) throws XDevException
buf
- mpjbuf.Buffer
object containing the datadestID
- ProcessID
of the destination processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Status recv(Buffer buf, ProcessID srcID, int tag, int context) throws XDevException
buf
- mpjbuf.Buffer
object containing the datasrcID
- ProcessID
of the source processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Request irecv(Buffer buf, ProcessID srcID, int tag, int context, Status status) throws XDevException
buf
- mpjbuf.Buffer
object containing the datasrcID
- ProcessID
of the source processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.status
- A mpjdev.Status
object initialized
at mpjdev/MPJ level.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Status probe(ProcessID srcID, int tag, int context) throws XDevException
srcID
- ProcessID
of the source processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Status iprobe(ProcessID srcID, int tag, int context) throws XDevException
srcID
- ProcessID
of the source processtag
- An integer representing the tag (id) of the messagecontext
- An integer specifying context.
XDevException
- If there is an exception. The specific exception
depends on the device.public abstract Request peek() throws XDevException
XDevException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |