Ini ada beberapa contoh program untuk MPI, dari situs www.cse.iitd.ernet.in . Kebanyakan dinamik tapi menggunakan input file. Jadi silakan mengganti input file nya secara manual, baik dari jumlah maupun jenis datanya. Sudah di test beberapa buah, dan bisa jalan.

Ini link downloadnya:

MPI program to print Hello World
(Download source code ; hello_world.c / hello_world.f)

MPI program to find sum of n integers using MPI point-to-point blocking communication library calls
(Download source code ; sum_pt_to_pt.c / sum_pt_to_pt.f)

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
(Download source code ; linear_topology.c / linear_topology.f)

MPI program to find sum of n integers on parallel computer in which processors are arranged in ring topology using MPI point-to-point blocking communication library calls
(Download source code ; ring_topology.c / ring_topology.f)

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 blocking communication library calls
(Download source code ; fan_in_blocking.c / fan_in_blocking.f)

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
(Download source code ; fan_in_nonblocking.c / fan_in_nonblocking.f)

MPI program to compute the value of PI by Numerical Integration using MPI point-to-point library calls
(Download source code ; pie_pt_to_pt.c / pie_pt_to_pt.f)

MPI program to scatter n integers using MPI collective communication library calls
(Download source code ; scatter.c / scatter.f)
(Download input file ; sdata.inp)

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
(Download source code ; allgather.c / allgather.f)
(Download input files ; gdata0, gdata1, gdata2, gdata3,gdata4, gdata5, gdata6, gdata7 or gdata.tar)

MPI program to find sum of n integers using MPI collective communication and computation library calls
(Download source code ; reduce.c / reduce.f)

MPI program to compute value of PI by Numerical Integration using MPI collective communication library calls
(Download source code ; pie_collective.c / pie_collective.f)

MPI program to construct a communicator consisting of group of diagonal processes in a square grid of processes using MPI groups library calls
(Download source code ; diag_comm.c / diag_comm.f)

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)

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)

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)

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 )

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)

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)

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)

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)

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)

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)

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)

MPI Parallel algorithm for solution of matrix system of linear equations by Jacobi method
(Download source code ; jacobi.c / jacobi.f)
(Download input files ; mdatjac.inp and vdatjac.inp)

MPI program for solution of matrix system of linear equations by Conjugate Gradient method
(Download source code ; congrad.c / congrad.f)
(Download input files ; mdatcg.inp and vdatcg.inp)

MPI program for solution of matrix system of linear equations A x = b by Gaussian Elimination method
(Download source code ; gauss_elimination.c / gauss_elimination.f)
(Download input files ; mdatgaus.inp and vdatgaus.inp)

MPI program for Sparse Matrix and Vector Multiplication using block-striped partitioning
(Download source code tar file ; sparse_matvect_c.tar / sparse_matvect_fort.tar)
(Download input files ; mdat_sparse.inp and vdat_sparse.inp)