Intercommunicator Constructors



next up previous contents
Next: Process Topologies Up: Intercommunication Previous: Intercommunicator Accessors

Intercommunicator Constructors

intercommunicator, constructors  

An intercommunicator can be created by a call to MPI_COMM_DUP, see Section gif. As for intracommunicators, this call generates a new inter-group communication domain with the same groups as the old one, and also replicates user-defined attributes. An intercommunicator is deallocated by a call to MPI_COMM_FREE. The other intracommunicator constructor functions of Section gif do not apply to intercommunicators. Two new functions are specific to intercommunicators.

MPI_Intercomm_create(MPI_Comm local_comm, int local_leader, MPI_Comm bridge_comm, int remote_leader, int tag, MPI_Comm *newintercomm)

MPI_INTERCOMM_CREATE(LOCAL_COMM, LOCAL_LEADER, PEER_COMM, REMOTE_LEADER, TAG, NEWINTERCOMM, IERROR)INTEGER LOCAL_COMM, LOCAL_LEADER, PEER_COMM, REMOTE_LEADER, TAG, NEWINTERCOMM, IERROR

MPI_INTERCOMM_CREATE creates an intercommunicator. The call is collective over the union of the two groups. Processes should provide matching local_comm and identical local_leader arguments within each of the two groups. The two leaders specify matching bridge_comm arguments, and each provide in remote_leader the rank of the other leader within the domain of bridge_comm. Both provide identical tag values.

Wildcards are not permitted for remote_leader, local_leader, nor tag.

This call uses point-to-point communication with communicator bridge_comm, and with tag tag between the leaders. Thus, care must be taken that there be no pending communication on bridge_comm that could interfere with this communication.

 MPI_INTERCOMM_MERGE(intercomm, high, newintracomm)

   IN       intercomm              InterCommunicator
   IN       high                   see below
   OUT      newintracomm           new intracommunicator
MPI_Intercomm_merge(MPI_Comm intercomm, int high, MPI_Comm *newintracomm)

MPI_INTERCOMM_MERGE(INTERCOMM, HIGH, NEWINTRACOMM, IERROR)INTEGER INTERCOMM, NEWINTRACOMM, IERROR
LOGICAL HIGH

MPI_INTERCOMM_MERGE creates an intracommunicator from the union of the two groups that are associated with intercomm. All processes should provide the same high value within each of the two groups. If processes in one group provided the value high = false and processes in the other group provided the value high = true then the union orders the ``low'' group before the ``high'' group. If all processes provided the same high argument then the order of the union is arbitrary. This call is blocking and collective within the union of the two groups.



next up previous contents
Next: Process Topologies Up: Intercommunication Previous: Intercommunicator Accessors



Jack Dongarra
Fri Sep 1 06:16:55 EDT 1995