Package mpi
Class Win
java.lang.Object
mpi.Win
- All Implemented Interfaces:
Freeable
This class represents
MPI_Win
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
-
Constructor Summary
ConstructorsConstructorDescriptionJava binding ofMPI_WIN_ALLOCATE
andMPI_WIN_ALLOCATE_SHARED
.Java binding ofMPI_WIN_CREATE
.Java binding ofMPI_WIN_CREATE_DYNAMIC
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accumulate
(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) Java binding ofMPI_ACCUMULATE
.void
Java binding ofMPI_WIN_ATTACH
.void
callErrhandler
(int errorCode) Java binding of the MPI operationMPI_WIN_CALL_ERRHANDLER
.void
compareAndSwap
(Buffer origin, Buffer compareAddr, 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
Create a new attribute key.void
deleteAttr
(int keyval) Deletes an attribute value associated with a key.void
Java binding ofMPI_WIN_DETACH
.void
fence
(int assertion) Java binding ofMPI_WIN_FENCE
.void
fetchAndOp
(Buffer origin, 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
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
(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) Java binding ofMPI_GET
.void
getAccumulate
(Buffer origin, int orgCount, Datatype orgType, Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) Java binding ofMPI_GET_ACCUMULATE
.getAttr
(int keyval) Retrieves attribute value by key.Java binding of the MPI operationMPI_WIN_GET_ERRHANDLER
.getGroup()
Java binding of the MPI operationMPI_GET_GROUP
.getInfo()
Java binding of the MPI operationMPI_WIN_GET_INFO
.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
Java binding of the MPI operationMPI_WIN_POST
.void
put
(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) Java binding ofMPI_PUT
.rAccumulate
(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) Java binding ofMPI_RACCUMULATE
.final Request
rGet
(Buffer origin, int orgCount, Datatype orgType, int targetRank, int targetDisp, int targetCount, Datatype targetType) Java binding ofMPI_RGET
.rGetAccumulate
(Buffer origin, int orgCount, Datatype orgType, Buffer resultAddr, int resultCount, Datatype resultType, int targetRank, int targetDisp, int targetCount, Datatype targetType, Op op) Java binding ofMPI_RGET_ACCUMULATE
.final Request
rPut
(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
Stores attribute value associated with a key.void
setErrhandler
(Errhandler errhandler) Java binding of the MPI operationMPI_WIN_SET_ERRHANDLER
.void
Java binding of the MPI operationMPI_WIN_SET_INFO
.void
Java binding of the MPI operationMPI_WIN_SET_NAME
.void
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
Java binding of the MPI operationMPI_WIN_UNLOCK_ALL
.void
waitFor()
Java binding of the MPI operationMPI_WIN_WAIT
.
-
Field Details
-
WIN_NULL
public static final int WIN_NULL- See Also:
-
FLAVOR_PRIVATE
public static final int FLAVOR_PRIVATE- See Also:
-
FLAVOR_SHARED
public static final int FLAVOR_SHARED- See Also:
-
-
Constructor Details
-
Win
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, 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
Java binding ofMPI_WIN_CREATE_DYNAMIC
.- Parameters:
info
- info objectcomm
- communicator- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
-
Method Details
-
attach
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
Java binding ofMPI_WIN_DETACH
.- Parameters:
base
- initial address of window- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getGroup
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(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(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(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
Java binding ofMPI_WIN_FENCE
.- Parameters:
assertion
- program assertion- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
start
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
Java binding of the MPI operationMPI_WIN_COMPLETE
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
post
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
Java binding of the MPI operationMPI_WIN_WAIT
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
test
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
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
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
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
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
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
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
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
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
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
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
Java binding ofMPI_WIN_FREE
.- Specified by:
free
in interfaceFreeable
- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getInfo
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
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(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(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(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(Buffer origin, int orgCount, Datatype orgType, 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(Buffer origin, int orgCount, Datatype orgType, 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
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
Java binding of the MPI operationMPI_WIN_UNLOCK_ALL
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
sync
Java binding of the MPI operationMPI_WIN_SYNC
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
flush
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
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(Buffer origin, Buffer compareAddr, 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(Buffer origin, 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
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
Java binding of the MPI operationMPI_WIN_FLUSH_LOCAL_ALL
.- Throws:
MPIException
- Signals that an MPI exception of some sort has occurred.
-
getName
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
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.
-