Virtual Topologies
Virtual Topologies
Introduction Many computational science and engineering problems reduce at the end to either a series of matrix or some form of grid operations, be it through differential, integral or other methods the dimensions of the matrices or grids are often determined by the physical problems Frequently in multiprocessing these matrices or grids are partitioned, or domain-decomposed so that each partition (or subdomain) is assigned to a process One such example is an m x n matrix decomposed into p g x n submatrices with each assigned to be worked on by one of the p processes
Introduction • Many computational science and engineering problems reduce at the end to either a series of matrix or some form of grid operations, be it through differential, integral or other methods. The dimensions of the matrices or grids are often determined by the physical problems. • Frequently in multiprocessing, these matrices or grids are partitioned, or domain-decomposed, so that each partition (or subdomain) is assigned to a process. • One such example is an m x n matrix decomposed into p q x n submatrices with each assigned to be worked on by one of the p processes
Introduction In this case, each process represents one distinct submatrix in a straightforward manner. However, an algorithm might dictate that the matrix be decomposed into a pxg logical grid, whose elements are themselves each an rx s matrix. This requirement might be due to a number of reasons: efficiency considerations, ease in code mplementation code clarity to name a few Although it is still possible to refer to each of these pxq subdomains by a linear rank number, it is obvious that a mapping of the linear process rank to a 2D virtual rank numbering would facilitate a much clearer and natural computational representation To address the needs of this and other topological layouts, the MPl library provides two types of topology routines Cartesian and graph topologies. Only Cartesian topology and the associated routines will be discussed in this chapter
Introduction • In this case, each process represents one distinct submatrix in a straightforward manner. However, an algorithm might dictate that the matrix be decomposed into a pxq logical grid, whose elements are themselves each an r x s matrix. This requirement might be due to a number of reasons: efficiency considerations, ease in code implementation, code clarity, to name a few. • Although it is still possible to refer to each of these pxq subdomains by a linear rank number, it is obvious that a mapping of the linear process rank to a 2D virtual rank numbering would facilitate a much clearer and natural computational representation. • To address the needs of this and other topological layouts, the MPI library provides two types of topology routines: Cartesian and graph topologies. Only Cartesian topology and the associated routines will be discussed in this chapter
MPI Topology Routines
MPI Topology Routines
Virtual Topology MPI Routines Some of the MPl topology routines are MPI CART CREATE MPI CART COORDS MPI CART RANK MPI CART SUB MPI CARTDIM GET MPI CART GET MPI CART SHIFT These routines are discussed in the following sections
Virtual Topology MPI Routines • Some of the MPI topology routines are – MPI_CART_CREATE – MPI_CART_COORDS – MPI_CART_RANK – MPI_CART_SUB – MPI_CARTDIM_GET – MPI_CART_GET – MPI_CART_SHIFT • These routines are discussed in the following sections