Class Intracomm
-
Field Summary
Fields inherited from class mpi.Comm
handle, SELF, TYPE_SHARED, WORLD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal IntercommJava binding ofMPI_COMM_ACCEPTusingMPI_INFO_NULL.final IntercommJava binding ofMPI_COMM_ACCEPT.clone()Duplicates this communicator.static voidJava binding ofMPI_CLOSE_PORT.final IntercommJava binding ofMPI_COMM_CONNECTusingMPI_INFO_NULL.final IntercommJava binding ofMPI_COMM_CONNECT.final IntracommCreate a new communicator.final CartCommcreateCart(int[] dims, boolean[] periods, boolean reorder) Creates a communicator to which the Cartesian topology information is attached.final GraphCommcreateDistGraph(int[] sources, int[] degrees, int[] destinations, int[] weights, Info info, boolean reorder) Creates a communicator to which the distributed graph topology information is attached.final GraphCommcreateDistGraph(int[] sources, int[] degrees, int[] destinations, Info info, boolean reorder) Creates a communicator to which the distributed graph topology information is attached.final GraphCommcreateDistGraphAdjacent(int[] sources, int[] sourceWeights, int[] destinations, int[] destWeights, Info info, boolean reorder) Creates a communicator to which the distributed graph topology information is attached.final GraphCommcreateDistGraphAdjacent(int[] sources, int[] destinations, Info info, boolean reorder) Creates a communicator to which the distributed graph topology information is attached.final GraphCommcreateGraph(int[] index, int[] edges, boolean reorder) Creates a communicator to which the graph topology information is attached.final IntracommcreateGroup(Group group, int tag) Create a new intracommunicator for the given group.dup()Duplicates this communicator.dupWithInfo(Info info) Duplicates this communicator with the info object used in the call.final voidPerform a prefix reduction on data distributed across the group.final voidPerform a prefix reduction on data distributed across the group.iDup()Duplicates this communicator.final RequestPerform a prefix reduction on data distributed across the group.final RequestPerform a prefix reduction on data distributed across the group.final RequestPerform a prefix reduction on data distributed across the group.final RequestPerform a prefix reduction on data distributed across the group.static StringlookupName(String service) Java binding ofMPI_LOOKUP_NAMEusingMPI_INFO_NULL.static StringlookupName(String service, Info info) Java binding ofMPI_LOOKUP_NAME.static StringopenPort()Java binding ofMPI_OPEN_PORTusingMPI_INFO_NULL.static StringJava binding ofMPI_OPEN_PORT.static voidpublishName(String service, String port) Java binding ofMPI_PUBLISH_NAMEusingMPI_INFO_NULL.static voidpublishName(String service, Info info, String port) Java binding ofMPI_PUBLISH_NAME.final voidPerform a prefix reduction on data distributed across the group.final voidPerform a prefix reduction on data distributed across the group.final IntercommJava binding ofMPI_COMM_SPAWN.final IntercommspawnMultiple(String[] commands, String[][] argv, int[] maxprocs, Info[] info, int root, int[] errcodes) Java binding ofMPI_COMM_SPAWN_MULTIPLE.final Intracommsplit(int colour, int key) Partition the group associated with this communicator and create a new communicator within each subgroup.final IntracommPartition the group associated with this communicator and create a new communicator within each subgroup.static voidunpublishName(String service, String port) Java binding ofMPI_UNPUBLISH_NAMEusingMPI_INFO_NULL.static voidunpublishName(String service, Info info, String port) Java binding ofMPI_UNPUBLISH_NAME.Methods inherited from class mpi.Comm
abort, allGather, allGather, allGatherv, allGatherv, allReduce, allReduce, allToAll, allToAllv, allToAllw, barrier, bcast, bSend, bSendInit, callErrhandler, compare, createIntercomm, createKeyval, deleteAttr, disconnect, dup, dupWithInfo, free, freeKeyval, gather, gather, gatherv, gatherv, gatherv, getAttr, getErrhandler, getGroup, getInfo, getName, getRank, getRequest, getSize, getTopology, iAllGather, iAllGather, iAllGatherv, iAllGatherv, iAllReduce, iAllReduce, iAllToAll, iAllToAllv, iAllToAllw, iBarrier, iBcast, ibSend, iDup, iGather, iGather, iGatherv, iGatherv, iGatherv, iNeighborAllGather, iNeighborAllGatherv, iNeighborAllToAll, iNeighborAllToAllv, iProbe, iRecv, iReduce, iReduce, iReduceScatter, iReduceScatter, iReduceScatterBlock, iReduceScatterBlock, irSend, iScatter, iScatter, iScatterv, iScatterv, iScatterv, iSend, isInter, isNull, isSend, neighborAllGather, neighborAllGatherv, neighborAllToAll, neighborAllToAllv, pack, packSize, probe, recv, recvInit, reduce, reduce, reduceLocal, reduceScatter, reduceScatter, reduceScatterBlock, reduceScatterBlock, rSend, rSendInit, scatter, scatter, scatterv, scatterv, scatterv, send, sendInit, sendRecv, sendRecvReplace, setAttr, setErrhandler, setInfo, setName, setType, sSend, sSendInit, unpack
-
Constructor Details
-
Intracomm
protected Intracomm() -
Intracomm
protected Intracomm(long handle) -
Intracomm
protected Intracomm(long[] commRequest)
-
-
Method Details
-
clone
Duplicates this communicator.Java binding of
MPI_COMM_DUP.It is recommended to use
dup()instead ofclone()because the last can't throw anMPIException. -
dup
Duplicates this communicator.Java binding of
MPI_COMM_DUP.- Overrides:
dupin classComm- Returns:
- copy of this communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
iDup
Duplicates this communicator.Java binding of
MPI_COMM_IDUP.The new communicator can't be used before the operation completes. The request object must be obtained calling
Comm.getRequest().- Overrides:
iDupin classComm- Returns:
- copy of this communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
dupWithInfo
Duplicates this communicator with the info object used in the call.Java binding of
MPI_COMM_DUP_WITH_INFO.- Overrides:
dupWithInfoin classComm- Parameters:
info- info object to associate with the new communicator- Returns:
- copy of this communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
split
Partition the group associated with this communicator and create a new communicator within each subgroup.Java binding of the MPI operation
MPI_COMM_SPLIT.- Parameters:
colour- control of subset assignmentkey- control of rank assignment- Returns:
- new communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
splitType
Partition the group associated with this communicator and create a new communicator within each subgroup.Java binding of the MPI operation
MPI_COMM_SPLIT_TYPE.- Parameters:
splitType- type of processes to be grouped togetherkey- control of rank assignmentinfo- info argument- Returns:
- new communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
create
Create a new communicator.Java binding of the MPI operation
MPI_COMM_CREATE.- Parameters:
group- group which is a subset of the group of this communicator- Returns:
- new communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createGroup
Create a new intracommunicator for the given group.Java binding of the MPI operation
MPI_COMM_CREATE_GROUP.- Parameters:
group- group which is a subset of the group of this communicatortag- an integer tag- Returns:
- new communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createCart
public final CartComm createCart(int[] dims, boolean[] periods, boolean reorder) throws MPIException Creates a communicator to which the Cartesian topology information is attached. Create a cartesian topology communicator whose group is a subset of the group of this communicator.Java binding of the MPI operation
MPI_CART_CREATE.The number of dimensions of the Cartesian grid is taken to be the size of the
dimsargument. The arrayperiodsmust be the same size.- Parameters:
dims- the number of processes in each dimensionperiods-trueif grid is periodic,falseif not, in each dimensionreorder-trueif ranking may be reordered,falseif not- Returns:
- new cartesian topology communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createGraph
Creates a communicator to which the graph topology information is attached.Java binding of the MPI operation
MPI_GRAPH_CREATE.The number of nodes in the graph, nnodes, is taken to be size of the
indexargument.- Parameters:
index- node degreesedges- graph edgesreorder-trueif ranking may be reordered,falseif not- Returns:
- new graph topology communicator
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createDistGraph
public final GraphComm createDistGraph(int[] sources, int[] degrees, int[] destinations, int[] weights, Info info, boolean reorder) throws MPIException Creates a communicator to which the distributed graph topology information is attached.Java binding of the MPI operation
MPI_DIST_GRAPH_CREATE.The number of source nodes is the size of the
sourcesargument.- Parameters:
sources- source nodes for which this process specifies edgesdegrees- number of destinations for each source nodedestinations- destination nodes for the source nodesweights- weights for source to destination edgesinfo- hints on optimization and interpretation of weightsreorder- the process may be reordered (true) or not (false)- Returns:
- communicator with distributed graph topology
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createDistGraph
public final GraphComm createDistGraph(int[] sources, int[] degrees, int[] destinations, Info info, boolean reorder) throws MPIException Creates a communicator to which the distributed graph topology information is attached.Java binding of the MPI operation
MPI_DIST_GRAPH_CREATEusingMPI_UNWEIGHTED.The number of source nodes is the size of the
sourcesargument.- Parameters:
sources- source nodes for which this process specifies edgesdegrees- number of destinations for each source nodedestinations- destination nodes for the source nodesinfo- hints on optimization and interpretation of weightsreorder- the process may be reordered (true) or not (false)- Returns:
- communicator with distributed graph topology
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createDistGraphAdjacent
public final GraphComm createDistGraphAdjacent(int[] sources, int[] sourceWeights, int[] destinations, int[] destWeights, Info info, boolean reorder) throws MPIException Creates a communicator to which the distributed graph topology information is attached.Java binding of the MPI operation
MPI_DIST_GRAPH_CREATE_ADJACENT.The number of source/destination nodes is the size of the
sources/destinationsargument.- Parameters:
sources- ranks of processes for which the calling process is a destinationsourceWeights- weights of the edges into the calling processdestinations- ranks of processes for which the calling process is a sourcedestWeights- weights of the edges out of the calling processinfo- hints on optimization and interpretation of weightsreorder- the process may be reordered (true) or not (false)- Returns:
- communicator with distributed graph topology
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
createDistGraphAdjacent
public final GraphComm createDistGraphAdjacent(int[] sources, int[] destinations, Info info, boolean reorder) throws MPIException Creates a communicator to which the distributed graph topology information is attached.Java binding of the MPI operation
MPI_DIST_GRAPH_CREATE_ADJACENTusingMPI_UNWEIGHTED.The number of source/destination nodes is the size of the
sources/destinationsargument.- Parameters:
sources- ranks of processes for which the calling process is a destinationdestinations- ranks of processes for which the calling process is a sourceinfo- hints on optimization and interpretation of weightsreorder- the process may be reordered (true) or not (false)- Returns:
- communicator with distributed graph topology
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
scan
public final void scan(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) throws MPIException Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_SCAN.- Parameters:
sendbuf- send buffer arrayrecvbuf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
scan
Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_SCANusingMPI_IN_PLACEinstead of the send buffer.- Parameters:
recvbuf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
iScan
public final Request iScan(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) throws MPIException Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_ISCAN.- Parameters:
sendbuf- send buffer arrayrecvbuf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Returns:
- communication request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
iScan
Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_ISCANusingMPI_IN_PLACEinstead of the send buffer.- Parameters:
buf- send/receive buffer arraycount- number of items in buffertype- data type of each item in bufferop- reduce operation- Returns:
- communication request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
exScan
public final void exScan(Object sendbuf, Object recvbuf, int count, Datatype type, Op op) throws MPIException Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_EXSCAN.- Parameters:
sendbuf- send buffer arrayrecvbuf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
exScan
Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_EXSCANusingMPI_IN_PLACEinstead of the send buffer.- Parameters:
buf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
iExScan
public final Request iExScan(Buffer sendbuf, Buffer recvbuf, int count, Datatype type, Op op) throws MPIException Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_IEXSCAN.- Parameters:
sendbuf- send buffer arrayrecvbuf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Returns:
- communication request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
iExScan
Perform a prefix reduction on data distributed across the group.Java binding of the MPI operation
MPI_IEXSCANusingMPI_IN_PLACEinstead of the send buffer.- Parameters:
buf- receive buffer arraycount- number of items in input buffertype- data type of each item in input bufferop- reduce operation- Returns:
- communication request
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
openPort
Java binding ofMPI_OPEN_PORTusingMPI_INFO_NULL.- Returns:
- port name
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
openPort
Java binding ofMPI_OPEN_PORT.- Parameters:
info- implementation-specific information- Returns:
- port name
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
closePort
Java binding ofMPI_CLOSE_PORT.- Parameters:
name- port name- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
accept
Java binding ofMPI_COMM_ACCEPTusingMPI_INFO_NULL.- Parameters:
port- port nameroot- rank in comm of root node- Returns:
- intercommunicator with client as remote group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
accept
Java binding ofMPI_COMM_ACCEPT.- Parameters:
port- port nameinfo- implementation-specific informationroot- rank in comm of root node- Returns:
- intercommunicator with client as remote group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
connect
Java binding ofMPI_COMM_CONNECTusingMPI_INFO_NULL.- Parameters:
port- port nameroot- rank in comm of root node- Returns:
- intercommunicator with server as remote group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
connect
Java binding ofMPI_COMM_CONNECT.- Parameters:
port- port nameinfo- implementation-specific informationroot- rank in comm of root node- Returns:
- intercommunicator with server as remote group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
publishName
Java binding ofMPI_PUBLISH_NAMEusingMPI_INFO_NULL.- Parameters:
service- service nameport- port name- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
publishName
Java binding ofMPI_PUBLISH_NAME.- Parameters:
service- service nameinfo- implementation-specific informationport- port name- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
unpublishName
Java binding ofMPI_UNPUBLISH_NAMEusingMPI_INFO_NULL.- Parameters:
service- service nameport- port name- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
unpublishName
Java binding ofMPI_UNPUBLISH_NAME.- Parameters:
service- service nameinfo- implementation-specific informationport- port name- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
lookupName
Java binding ofMPI_LOOKUP_NAMEusingMPI_INFO_NULL.- Parameters:
service- service name- Returns:
- port name
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
lookupName
Java binding ofMPI_LOOKUP_NAME.- Parameters:
service- service nameinfo- mplementation-specific information- Returns:
- port name
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
spawn
public final Intercomm spawn(String command, String[] argv, int maxprocs, Info info, int root, int[] errcodes) throws MPIException Java binding ofMPI_COMM_SPAWN. This intracommunicator will contain the group of spawned processes.- Parameters:
command- name of program to be spawnedargv- arguments to command; if this parameter is null,MPI_ARGV_NULLwill be used.maxprocs- maximum number of processes to startinfo- info object telling the runtime where and how to start the processesroot- rank of process in which previous arguments are examinederrcodes- one code per process; if this parameter is null,MPI_ERRCODES_IGNOREwill be used.- Returns:
- intercommunicator between original group and the newly spawned group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-
spawnMultiple
public final Intercomm spawnMultiple(String[] commands, String[][] argv, int[] maxprocs, Info[] info, int root, int[] errcodes) throws MPIException Java binding ofMPI_COMM_SPAWN_MULTIPLE. This intracommunicator will contain the group of spawned processes.- Parameters:
commands- programs to be executedargv- arguments for commands; if this parameter is null,MPI_ARGVS_NULLwill be used.maxprocs- maximum number of processes to start for each commandinfo- info objects telling the runtime where and how to start the processesroot- rank of process in which previous arguments are examinederrcodes- one code per process; if this parameter is null,MPI_ERRCODES_IGNOREwill be used.- Returns:
- intercommunicator between original group and the newly spawned group
- Throws:
MPIException- Signals that an MPI exception of some sort has occurred.
-