views:

113

answers:

2

I have read the definitions of these terms and my interpretation is that there is a one to one relation between a group and a communicator. A group is a set of processes which wish to communicate with each other and a communicator is an implementation for a group. Is this correct?

Why have two different terms if this is so?

A: 

There are a lot of differences between communicators and groups as I found out after reading the MPI Specification.

Edit: Groups are objects that represent groups of processes.

Communicator is a set of processes that may communicate with each other and may consist of processes from a single group or from multiple groups.

Thus they are completely different entities. They should not be confused with each other.

iamrohitbanga
I've downvoted this because it is a poor answer to the question, it does nothing to explain to the OP what the differences may be.
High Performance Mark
corrected the answer
iamrohitbanga
+1  A: 

A Group is an 'ordered set of process identifiers' (MPI 2.2 spec, sec 6.2.1) The ordering is given by associating with each process identifier a unique Rank from 0 to group.Size - 1.

A Communicator encapsulates all communication among a set of processes. An Intra-communicator is associated with a Group as well as 'contexts of communication for both point-to-point and collective communication' and possibly other context information such as virtual topologies (spec, 6.1.2). An Inter-communicator is associated with two non-overlapping Groups.

I (probably very loosely) think of a Communicator's Group as its symbol table.

As iamhoritbanga noted, a Group may contain process identifiers from several communicators.

Finally, construction of and operations on Groups are local to the process, and do not involve interprocess communication. This is not in general true for Communicators (by their very nature).