#include #include #include #include #include #include //Example compilation //mpicc ring_comm_starter.c -lm -o ring_comm_starter //Example execution //mpirun -np 2 -hostfile myhostfile.txt ./ring_comm_starter int main(int argc, char **argv) { int my_rank, nprocs; MPI_Init(&argc,&argv); MPI_Comm_rank(MPI_COMM_WORLD,&my_rank); MPI_Comm_size(MPI_COMM_WORLD,&nprocs); if (nprocs==1) { printf("\n\nEnter at least 2 process ranks\n\n"); MPI_Finalize(); return 0; } //Write code here MPI_Finalize(); return 0; }