Package mpi
Class Win
- java.lang.Object
-
- mpi.Win
-
-
Field Summary
Fields Modifier and Type Field Description static int
FLAVOR_PRIVATE
static int
FLAVOR_SHARED
static int
WIN_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_ALLOCATE
andMPI_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 void
accumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)
Java binding ofMPI_ACCUMULATE
.void
attach(java.nio.Buffer base, int size)
Java binding ofMPI_WIN_ATTACH
.void
callErrhandler(int errorCode)
Java binding of the MPI operationMPI_WIN_CALL_ERRHANDLER
.void
compareAndSwap(java.nio.Buffer origin, java.nio.Buffer compareAddr, java.nio.Buffer resultAddr, Datatype targetType, int targetRank, int targetDisp)
Java binding ofMPI_COMPARE_AND_SWAP
.void
complete()
Java binding of the MPI operationMPI_WIN_COMPLETE
.static int
createKeyval()
Create a new attribute key.void
deleteAttr(int keyval)
Deletes an attribute value associated with a key.void
detach(java.nio.Buffer base)
Java binding ofMPI_WIN_DETACH
.void
fence(int assertion)
Java binding ofMPI_WIN_FENCE
.void
fetchAndOp(java.nio.Buffer origin, java.nio.Buffer resultAddr, Datatype dataType, int targetRank, int targetDisp, Op op)
Java binding ofMPI_FETCH_AND_OP
.void
flush(int targetRank)
Java binding of the MPI operationMPI_WIN_FLUSH
.void
flushAll()
Java binding of the MPI operationMPI_WIN_FLUSH_ALL
.void
flushLocal(int targetRank)
Java binding of the MPI operationMPI_WIN_FLUSH_LOCAL
.void
flushLocalAll()
Java binding of the MPI operationMPI_WIN_FLUSH_LOCAL_ALL
.void
free()
Java binding ofMPI_WIN_FREE
.static void
freeKeyval(int keyval)
Frees an attribute key.void
get(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)
Java binding ofMPI_GET
.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)
Java binding ofMPI_GET_ACCUMULATE
.java.lang.Object
getAttr(int keyval)
Retrieves attribute value by key.Errhandler
getErrhandler()
Java binding of the MPI operationMPI_WIN_GET_ERRHANDLER
.Group
getGroup()
Java binding of the MPI operationMPI_GET_GROUP
.Info
getInfo()
Java binding of the MPI operationMPI_WIN_GET_INFO
.java.lang.String
getName()
Java binding of the MPI operationMPI_WIN_GET_NAME
.void
lock(int lockType, int rank, int assertion)
Java binding of the MPI operationMPI_WIN_LOCK
.void
lockAll(int assertion)
Java binding of the MPI operationMPI_WIN_LOCK_ALL
.void
post(Group group, int assertion)
Java binding of the MPI operationMPI_WIN_POST
.void
put(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)
Java binding ofMPI_PUT
.Request
rAccumulate(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op)
Java binding ofMPI_RACCUMULATE
.Request
rGet(java.nio.Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType)
Java binding ofMPI_RGET
.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)
Java binding ofMPI_RGET_ACCUMULATE
.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)
Java binding of the MPI operationMPI_RPUT
.void
setAttr(int keyval, java.lang.Object value)
Stores attribute value associated with a key.void
setErrhandler(Errhandler errhandler)
Java binding of the MPI operationMPI_WIN_SET_ERRHANDLER
.void
setInfo(Info info)
Java binding of the MPI operationMPI_WIN_SET_INFO
.void
setName(java.lang.String name)
Java binding of the MPI operationMPI_WIN_SET_NAME
.void
start(Group group, int assertion)
Java binding of the MPI operationMPI_WIN_START
.void
sync()
Java binding of the MPI operationMPI_WIN_SYNC
.boolean
test()
Java binding of the MPI operationMPI_WIN_TEST
.void
unlock(int rank)
Java binding of the MPI operationMPI_WIN_UNLOCK
.void
unlockAll()
Java binding of the MPI operationMPI_WIN_UNLOCK_ALL
.void
waitFor()
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 MPIException
Java 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 MPIException
Java binding ofMPI_WIN_ALLOCATE
andMPI_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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java binding of the MPI operationMPI_WIN_WAIT
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
test
public boolean test() throws MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Create 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 MPIException
Frees 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 MPIException
Stores 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 MPIException
Retrieves 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 MPIException
Deletes 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 MPIException
Java binding ofMPI_WIN_FREE
.- Specified by:
free
in 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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 MPIException
Java 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.
-
-