Communicators

So far, the communicator that you are familiar with is MPI_COMM_WORLD (see Section 3.9). This is a communicator defined by MPI to permit all processes of your program at run time to communicate with each other, be it point-to-point or collective. In this section, you will learn to create new communicators. Two types of communicators exist within MPI: intra-communicators and inter-communicators. We will focus on intra-communicators which deal with communications among processes within individual communicators. Inter-communicators on the other hand deal with communications between intra-communicators. Intra-communicators are essentially subsets of processes of MPI_COMM_WORLD. The need for these new communicators is often driven by the need to deal with, for instance, rows, columns or subblocks of a matrix. These communicators are often used in conjunction with a virtual topology -- more often than not a cartesian topology -- to facilitate ease in implementation of parallel operations. Furthermore, the use of communicators, and quite frequently together with virtual topology, generally enhances the readability and maintainability of a program.

To this end, many routines are available in the MPI library to perform various communication-related tasks