/********************************************************** File: main.cc Description: A program that simulates a simple poker game to serve as an example of using the Scatter and Gather functions from MPI. Author: Dana Vrajitoru Organization: IUSB Date: October 14, 2004 ***********************************************************/ #include #include #include #include "poker.h" // The main function int main(int argc, char **argv) { int proc_id, nb_proc, n; /* Initialize MPI */ MPI_Init (&argc, &argv); /* Get the rank of this process */ MPI_Comm_rank (MPI_COMM_WORLD, &proc_id); /* Get nb of processes */ MPI_Comm_size (MPI_COMM_WORLD, &nb_proc); srand(time(NULL)); Poker_play(proc_id, nb_proc); /* Finalize MPI */ MPI_Finalize (); return 0; } // End of the program