|
MPI Examples |
The hands-on session introduces you to algorithms involving simple programs using point-point and global communications, numerical algorithms and non-numerical algorithms. Also, special class of numerical methods to solve Partial Differential Equations have been discussed. You have to write a simple program that executes on a Cluster. In order to make your programs more portable, you will be using the MPI (Message Passing Interface). |
|
List of MPI Examples |
---|
1.3 List of MPI Programs in FORTRAN and C Example 1 : MPI program to print Hello World (Download source code ; hello_world.c / hello_world.f) Example 2 :
MPI program to find sum of n integers using MPI point-to-point blocking communication library calls
Example
3 : MPI program to find sum of n integers on parallel computer in which processors are arranged in linear array topology using MPI point-to-point blocking communication library calls
Example 6 : MPI program to find sum of n integers on parallel computer in which processors are arranged in binary tree topology (associative fan-in rule) using MPI point-to-point non-blocking communication library calls
Example
7 : MPI program to compute the value of PI by Numerical Integration using MPI point-to-point library calls
Example
9 : MPI program to gather n integers from p process and make the resultant gathered data (np) available on every process using collective communication library calls
Example
10 : MPI program to find sum of n integers using MPI collective communication and computation library calls
|
Example 13 : MPI program to compute dot product of two vectors using block-striped partitioning with uniform data distribution (Download source code ; vv_mult_blkstp_unf.c / vv_mult_blkstp_unf.f) (Download input files ; vdata1.inp and vdata2.inp) Example 14 : MPI program to compute dot product of two vectors using block-striped partitioning with non-uniform data distribution (Download source code ; vv_mult_blkstp_nonunf.c / vv_mult_blkstp_nonunf.f) (Download input files ; vdata1.inp and vdata2.inp) Example 15 : MPI program to compute dot product of two vectors using block -striped partitioning with cyclic data distribution (Download source code ; vv_mult_blk_cyclic.c / vv_mult_blk_cyclic.f) (Download input files ; vdata1.inp and vdata2.inp) Example 16 : MPI program to compute infinity norm of a matrix using block -striped partitioning and uniform data distribution (Download source code ; mat_infnorm_blkstp.c / mat_infnorm_blkstp.f) (Download input files ; infndata.inp ) Example 17 : MPI program to compute the Matrix and Vector Multiplication using self-scheduling algorithm (Download source code ; mv_mult_master_sschd.c and mv_mult_slave_sschd.c / mv_mult_master_sschd.f and mv_mult_slave_sschd.f) (Download input files ; mdata.inp and vdata.inp) Example 18 : MPI program to compute the Matrix and Vector Multiplication using block-striped row-wise partitioning with uniform data distribution (Download source code ; mv_mult_blkstp.c / mv_mult_blkstp.f) (Download input files ; mdata.inp and vdata.inp) Example 19 : MPI program to compute Matrix and Vector Multiplication using block checkerboard partitioning (Download source code ; mv_mult_checkerboard.c / mv_mult_checkerboard.f) (Download input files ; mdata.inp and vdata.inp) Example 20 : MPI program to compute Matrix and Matrix Multiplication using self-scheduling algorithm (Download source code ; mm_mult_master_sschd.c and mm_mult_slave_sschd.c / mm_mult_master_sschd.f and mm_mult_slave_sschd.f) (Download input files ; mdata1.inp and mdata2.inp) Example 21 : MPI program to compute Matrix and Matrix Multiplication using block checkerboard partitioning and MPI Cartesian topology (MPI Cartesian topology) (Download source code ; mm_mult_cartesian.c / mm_mult_cartesian.f) (Download input files ; mdata1.inp and mdata2.inp) Example 22 : MPI program to compute Matrix and Matrix Multiplication using block checkerboard partitioning and Cannon Algorithm (Cannon Algorithm) (Download source code ; mm_mult_cannon.c) (Download input files ; mdata1.inp and mdata2.inp) Example 23 : MPI program to compute Matrix and Matrix Multiplication using block checkerboard partitioning and Fox Algorithm (Fox Algorithm) (Download source code ; mm_mult_fox.c) (Download input files ; mdata1.inp and mdata2.inp) |
Example
24 : MPI Parallel algorithm for solution of matrix system of linear equations by Jacobi method
Example
26 : MPI program for solution of matrix system of linear equations A x = b by Gaussian Elimination method
Example 27 : MPI program for Sparse Matrix and Vector Multiplication using block-striped partitioning
Example
28 : MPI program for sorting n integers using sample sort
Example
29 : MPI program for solution of PDE (Poisson Equation) by finite difference method
|