#include #include #include void main(argc,argv) int argc; char *argv[]; { int p, i, Iam, root; int counts[4] = {1, 2, 3, 4}; int displs[4] = {0, 1, 3, 6}; char x[10], y[10], a, alphabet; /*----------------*/ /* initialize MPI */ /*----------------*/ MPI_Init(&argc,&argv); /*---------------------------*/ /* get the process ID number */ /*---------------------------*/ MPI_Comm_rank(MPI_COMM_WORLD, &Iam); /*-----------------------------------*/ /* get the size of the process group */ /*-----------------------------------*/ MPI_Comm_size(MPI_COMM_WORLD, &p); root = 1; if (Iam == 0) { printf(" Function Proc Sendbuf Recvbuf\n"); printf(" -------- ---- ------- -------\n"); } MPI_Barrier(MPI_COMM_WORLD); for (i=0; i