________________________________________________________     Description for Implementation of MPI Programs ________________________________________________________

 VECTOR-VECTOR MULTIPLICATION  BACKGROUND   Vectors can be partitioned in different ways and the partitions can be assigned to different process. We briefly explain some well known partitioning techniques to write parallel programs. In the striped partitioning of a vector, the vector is divided into groups of contiguous elements, and each process is assigned one such group.  A serial algorithm for vector-vector multiplication requires n multiplications and (n-1 ) additions .The serial program is given below :  float VECT_VECT (int n, float x[ ], float y[ ])      {         int i;        float dot_product;        dot_product  = 0.0;         for(i = 0; i < n; i++)           dot_product = dot_product + (x[i] * y[i]);          return(dot_product);     }     MATRIX-VECTOR MULTIPLICATION      BACKGROUND   Matrices can be classified  into two broad categories, dense matrices and sparse matrices. Dense or full matrices  have few or no zero elements. Sparse matrices  have a majority of zero elements . In order to process a matrix input in parallel, we must partition it so that the partitions can be assigned to different processes.  If we assume that an addition and multiplication pair takes unit time, then the sequential run time of algorithm is n2. For multiplying a dense matrix A of size m x n and a vector x  of size n  atleast, three distinct parallel formulations of matrix-vector multiplication's are possible.  It depends on row-wise striping, column-wise striping, or checkerboard striping of  the matrix. The following examples discuss common ways to partition matrices among processes to perform matrix-vector multiplication.  Serial algorithm of matrix vector multiplication is explained below:         void MAT_VECT(int n, int m, float A[ ][ ], float x[ ], float y[ ])           {              int   i, j;                 for (i = 0; i