Package mpi
Class Win
- java.lang.Object
-
- mpi.Win
-
-
Field Summary
Fields Modifier and Type Field Description static intFLAVOR_PRIVATEstatic intFLAVOR_SHAREDstatic intWIN_NULL
-
Constructor Summary
Constructors Constructor Description Win(int size, int dispUnit, Info info, Comm comm, java.nio.Buffer base, int flavor)Java binding ofMPI_WIN_ALLOCATEandMPI_WIN_ALLOCATE_SHARED.Win(java.nio.Buffer base, int size, int dispUnit, Info info, Comm comm)Java binding ofMPI_WIN_CREATE.Win(Info info, Comm comm)Java binding ofMPI_WIN_CREATE_DYNAMIC.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)Java binding ofMPI_ACCUMULATE.voidattach(java.nio.Buffer base, int size)Java binding ofMPI_WIN_ATTACH.voidcallErrhandler(int errorCode)Java binding of the MPI operationMPI_WIN_CALL_ERRHANDLER.voidcompareAndSwap(java.nio.Buffer origin, java.nio.Buffer compareAddr, java.nio.Buffer resultAddr, Datatype targetType, int targetRank, int targetDisp)Java binding ofMPI_COMPARE_AND_SWAP.voidcomplete()Java binding of the MPI operationMPI_WIN_COMPLETE.static intcreateKeyval()Create a new attribute key.voiddeleteAttr(int keyval)Deletes an attribute value associated with a key.voiddetach(java.nio.Buffer base)Java binding ofMPI_WIN_DETACH.voidfence(int assertion)Java binding ofMPI_WIN_FENCE.voidfetchAndOp(java.nio.Buffer origin, java.nio.Buffer resultAddr, Datatype dataType, int targetRank, int targetDisp, Op op)Java binding ofMPI_FETCH_AND_OP.voidflush(int targetRank)Java binding of the MPI operationMPI_WIN_FLUSH.voidflushAll()Java binding of the MPI operationMPI_WIN_FLUSH_ALL.voidflushLocal(int targetRank)Java binding of the MPI operationMPI_WIN_FLUSH_LOCAL.voidflushLocalAll()Java binding of the MPI operationMPI_WIN_FLUSH_LOCAL_ALL.voidfree()Java binding ofMPI_WIN_FREE.static voidfreeKeyval(int keyval)Frees an attribute key.voidget(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)Java binding ofMPI_GET.voidgetAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, java.nio.Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)Java binding ofMPI_GET_ACCUMULATE.java.lang.ObjectgetAttr(int keyval)Retrieves attribute value by key.ErrhandlergetErrhandler()Java binding of the MPI operationMPI_WIN_GET_ERRHANDLER.GroupgetGroup()Java binding of the MPI operationMPI_GET_GROUP.InfogetInfo()Java binding of the MPI operationMPI_WIN_GET_INFO.java.lang.StringgetName()Java binding of the MPI operationMPI_WIN_GET_NAME.voidlock(int lockType, int rank, int assertion)Java binding of the MPI operationMPI_WIN_LOCK.voidlockAll(int assertion)Java binding of the MPI operationMPI_WIN_LOCK_ALL.voidpost(Group group, int assertion)Java binding of the MPI operationMPI_WIN_POST.voidput(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)Java binding ofMPI_PUT.RequestrAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)Java binding ofMPI_RACCUMULATE.RequestrGet(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)Java binding ofMPI_RGET.RequestrGetAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, java.nio.Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)Java binding ofMPI_RGET_ACCUMULATE.RequestrPut(java.nio.Buffer origin_addr, int origin_count, Datatype origin_datatype, int target_rank, int target_disp, int target_count, Datatype target_datatype)Java binding of the MPI operationMPI_RPUT.voidsetAttr(int keyval, java.lang.Object value)Stores attribute value associated with a key.voidsetErrhandler(Errhandler errhandler)Java binding of the MPI operationMPI_WIN_SET_ERRHANDLER.voidsetInfo(Info info)Java binding of the MPI operationMPI_WIN_SET_INFO.voidsetName(java.lang.String name)Java binding of the MPI operationMPI_WIN_SET_NAME.voidstart(Group group, int assertion)Java binding of the MPI operationMPI_WIN_START.voidsync()Java binding of the MPI operationMPI_WIN_SYNC.booleantest()Java binding of the MPI operationMPI_WIN_TEST.voidunlock(int rank)Java binding of the MPI operationMPI_WIN_UNLOCK.voidunlockAll()Java binding of the MPI operationMPI_WIN_UNLOCK_ALL.voidwaitFor()Java binding of the MPI operationMPI_WIN_WAIT.
-
-
-
Field Detail
-
WIN_NULL
public static final int WIN_NULL
- See Also:
- Constant Field Values
-
FLAVOR_PRIVATE
public static final int FLAVOR_PRIVATE
- See Also:
- Constant Field Values
-
FLAVOR_SHARED
public static final int FLAVOR_SHARED
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Win
public Win(java.nio.Buffer base, int size, int dispUnit, Info info, Comm comm) throws MPIExceptionJava binding ofMPI_WIN_CREATE.- Parameters:
base- initial address of windowsize- size of window (buffer elements)dispUnit- local unit size for displacements (buffer elements)info- info objectcomm- communicator- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
Win
public Win(int size, int dispUnit, Info info, Comm comm, java.nio.Buffer base, int flavor) throws MPIExceptionJava binding ofMPI_WIN_ALLOCATEandMPI_WIN_ALLOCATE_SHARED.- Parameters:
size- size of window (buffer elements)dispUnit- local unit size for displacements (buffer elements)info- info objectcomm- communicatorbase- initial address of windowflavor- FLAVOR_PRIVATE or FLAVOR_SHARED- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
Win
public Win(Info info, Comm comm) throws MPIException
Java binding ofMPI_WIN_CREATE_DYNAMIC.- Parameters:
info- info objectcomm- communicator- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
-
Method Detail
-
attach
public void attach(java.nio.Buffer base, int size) throws MPIExceptionJava binding ofMPI_WIN_ATTACH.- Parameters:
base- initial address of windowsize- size of window (buffer elements)- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
detach
public void detach(java.nio.Buffer base) throws MPIExceptionJava binding ofMPI_WIN_DETACH.- Parameters:
base- initial address of window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getGroup
public Group getGroup() throws MPIException
Java binding of the MPI operationMPI_GET_GROUP.- Returns:
- group of processes which share access to the window
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
put
public void put(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) throws MPIExceptionJava binding ofMPI_PUT.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target buffer- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
get
public void get(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) throws MPIExceptionJava binding ofMPI_GET.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target buffer- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
accumulate
public void accumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) throws MPIExceptionJava binding ofMPI_ACCUMULATE.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
fence
public void fence(int assertion) throws MPIExceptionJava binding ofMPI_WIN_FENCE.- Parameters:
assertion- program assertion- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
start
public void start(Group group, int assertion) throws MPIException
Java binding of the MPI operationMPI_WIN_START.- Parameters:
group- group of target processesassertion- program assertion- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
complete
public void complete() throws MPIExceptionJava binding of the MPI operationMPI_WIN_COMPLETE.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
post
public void post(Group group, int assertion) throws MPIException
Java binding of the MPI operationMPI_WIN_POST.- Parameters:
group- group of origin processesassertion- program assertion- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
waitFor
public void waitFor() throws MPIExceptionJava binding of the MPI operationMPI_WIN_WAIT.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
test
public boolean test() throws MPIExceptionJava binding of the MPI operationMPI_WIN_TEST.- Returns:
- true if success
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
lock
public void lock(int lockType, int rank, int assertion) throws MPIExceptionJava binding of the MPI operationMPI_WIN_LOCK.- Parameters:
lockType- either MPI.LOCK_EXCLUSIVE or MPI.LOCK_SHAREDrank- rank of locked windowassertion- program assertion- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
unlock
public void unlock(int rank) throws MPIExceptionJava binding of the MPI operationMPI_WIN_UNLOCK.- Parameters:
rank- rank of window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
setErrhandler
public void setErrhandler(Errhandler errhandler) throws MPIException
Java binding of the MPI operationMPI_WIN_SET_ERRHANDLER.- Parameters:
errhandler- new MPI error handler for window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getErrhandler
public Errhandler getErrhandler() throws MPIException
Java binding of the MPI operationMPI_WIN_GET_ERRHANDLER.- Returns:
- MPI error handler currently associated with window
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
callErrhandler
public void callErrhandler(int errorCode) throws MPIExceptionJava binding of the MPI operationMPI_WIN_CALL_ERRHANDLER.- Parameters:
errorCode- error code- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createKeyval
public static int createKeyval() throws MPIExceptionCreate a new attribute key.Java binding of the MPI operation
MPI_WIN_CREATE_KEYVAL.- Returns:
- attribute key for future access
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
freeKeyval
public static void freeKeyval(int keyval) throws MPIExceptionFrees an attribute key.Java binding of the MPI operation
MPI_WIN_FREE_KEYVAL.- Parameters:
keyval- attribute key- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
setAttr
public void setAttr(int keyval, java.lang.Object value) throws MPIExceptionStores attribute value associated with a key.Java binding of the MPI operation
MPI_WIN_SET_ATTR.- Parameters:
keyval- attribute keyvalue- attribute value- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getAttr
public java.lang.Object getAttr(int keyval) throws MPIExceptionRetrieves attribute value by key.Java binding of the MPI operation
MPI_WIN_GET_ATTR.- Parameters:
keyval- attribute key- Returns:
- attribute value or null if no attribute is associated with the key.
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
deleteAttr
public void deleteAttr(int keyval) throws MPIExceptionDeletes an attribute value associated with a key.Java binding of the MPI operation
MPI_WIN_DELETE_ATTR.- Parameters:
keyval- attribute key- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
free
public void free() throws MPIExceptionJava binding ofMPI_WIN_FREE.- Specified by:
freein interfaceFreeable- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getInfo
public Info getInfo() throws MPIException
Java binding of the MPI operationMPI_WIN_GET_INFO.- Returns:
- Info Info object associated with this window
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
setInfo
public void setInfo(Info info) throws MPIException
Java binding of the MPI operationMPI_WIN_SET_INFO.- Parameters:
info- the new info- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
rPut
public final Request rPut(java.nio.Buffer origin_addr, int origin_count, Datatype origin_datatype, int target_rank, int target_disp, int target_count, Datatype target_datatype) throws MPIException
Java binding of the MPI operation
MPI_RPUT.- Parameters:
origin_addr- initial address of origin bufferorigin_count- number of entries in origin bufferorigin_datatype- datatype of each entry in origin buffertarget_rank- rank of targettarget_disp- displacement from start of window to target buffertarget_count- number of entries in target buffertarget_datatype- datatype of each entry in target buffer- Returns:
- RMA request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
rGet
public final Request rGet(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) throws MPIException
Java binding ofMPI_RGET.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target buffer- Returns:
- RMA request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
rAccumulate
public Request rAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) throws MPIException
Java binding ofMPI_RACCUMULATE.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target bufferop- reduce operation- Returns:
- RMA request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getAccumulate
public void getAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, java.nio.Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) throws MPIExceptionJava binding ofMPI_GET_ACCUMULATE.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin bufferresultAddr- result bufferresultCount- number of entries in result bufferresultType- datatype of each entry in result buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
rGetAccumulate
public Request rGetAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, java.nio.Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) throws MPIException
Java binding ofMPI_RGET_ACCUMULATE.- Parameters:
origin- origin bufferorgCount- number of entries in origin bufferorgType- datatype of each entry in origin bufferresultAddr- result bufferresultCount- number of entries in result bufferresultType- datatype of each entry in result buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffertargetCount- number of entries in target buffertargetType- datatype of each entry in target bufferop- reduce operation- Returns:
- RMA request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
lockAll
public void lockAll(int assertion) throws MPIExceptionJava binding of the MPI operationMPI_WIN_LOCK_ALL.- Parameters:
assertion- program assertion- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
unlockAll
public void unlockAll() throws MPIExceptionJava binding of the MPI operationMPI_WIN_UNLOCK_ALL.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
sync
public void sync() throws MPIExceptionJava binding of the MPI operationMPI_WIN_SYNC.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
flush
public void flush(int targetRank) throws MPIExceptionJava binding of the MPI operationMPI_WIN_FLUSH.- Parameters:
targetRank- rank of target window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
flushAll
public void flushAll() throws MPIExceptionJava binding of the MPI operationMPI_WIN_FLUSH_ALL.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
compareAndSwap
public void compareAndSwap(java.nio.Buffer origin, java.nio.Buffer compareAddr, java.nio.Buffer resultAddr, Datatype targetType, int targetRank, int targetDisp) throws MPIExceptionJava binding ofMPI_COMPARE_AND_SWAP.- Parameters:
origin- origin buffercompareAddr- compare bufferresultAddr- result buffertargetType- datatype of each entry in target buffertargetRank- rank of targettargetDisp- displacement from start of window to target buffer- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
fetchAndOp
public void fetchAndOp(java.nio.Buffer origin, java.nio.Buffer resultAddr, Datatype dataType, int targetRank, int targetDisp, Op op) throws MPIExceptionJava binding ofMPI_FETCH_AND_OP.- Parameters:
origin- origin bufferresultAddr- result bufferdataType- datatype of entry in origin, result, and target bufferstargetRank- rank of targettargetDisp- displacement from start of window to target bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
flushLocal
public void flushLocal(int targetRank) throws MPIExceptionJava binding of the MPI operationMPI_WIN_FLUSH_LOCAL.- Parameters:
targetRank- rank of target window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
flushLocalAll
public void flushLocalAll() throws MPIExceptionJava binding of the MPI operationMPI_WIN_FLUSH_LOCAL_ALL.- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
getName
public java.lang.String getName() throws MPIExceptionJava binding of the MPI operationMPI_WIN_GET_NAME.- Returns:
- the name associated with this window
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
setName
public void setName(java.lang.String name) throws MPIExceptionJava binding of the MPI operationMPI_WIN_SET_NAME.- Parameters:
name- the name to associate with this window- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
-