Communicators
Communicators
Introduction So far, the communicator that you are familiar with is MPI COMM WORLD This is a communicator defined by MPI to permit all processes of your program to communicate with each other at run time, either between two processes( point to-point )or among all processes( collective For some applications however, communications among a selected subgroup of processes may be desirable or required In this section, you will learn how to create new communicators for these situations
Introduction • So far, the communicator that you are familiar with is MPI_COMM_WORLD. • This is a communicator defined by MPI to permit all processes of your program to communicate with each other at run time, either between two processes ( pointto-point ) or among all processes ( collective ). • For some applications however, communications among a selected subgroup of processes may be desirable or required. • In this section, you will learn how to create new communicators for these situations
Introduction Two types of communicators exist within MPI Intra-communicators Inter -communicators This chapter will focus on intra- communicators that deal with communications among processes within individual communicators Inter-communicators on the other hand deal with communications t between intra-communicators Essentially intra-communicators are subsets of processes of MPI COMM WORLD The need for these new communicators is often driven by the need to deal subblock f a mat These communicators are often used in conjunction with a virtual topology more often than not a Cartesian topology -to facilitate 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
Introduction • Two types of communicators exist within MPI: – Intra-communicators – Inter-communicators. • This chapter will focus on intra-communicators that deal with communications among processes within individual communicators. • Inter-communicators, on the other hand, deal with communications between intra-communicators. • Essentially, intra-communicators are 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 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
Introduction To this end, many routines are available in the mPi librar to perform various communication-related tasks. These are MPI COMM GROUP MPI GROUP NCL MPI GROUP EXCL MPI GROUP RANK MPI GROUP FREE MPI COMM CREATE MPI COMM SPLIT These routines are described in the following sections
Introduction • To this end, many routines are available in the MPI library to perform various communication-related tasks. These are – MPI_COMM_GROUP – MPI_GROUP_INCL – MPI_GROUP_EXCL – MPI_GROUP_RANK – MPI_GROUP_FREE – MPI_COMM_CREATE – MPI_COMM_SPLIT • These routines are described in the following sections
MPI COMM GROUP
MPI_COMM_GROUP