2 /* Creator: Jeffrey Vetter (j-vetter@llnl.gov) Mon Nov 1 1999 */
3 /* collective-misorder.c -- do some collective operations (w/ one of them out of order) */
7 "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/collective-misorder.c,v 1.2 2000/12/04 19:09:45 bronis Exp $";
17 main (int argc, char **argv)
21 int comm = MPI_COMM_WORLD;
22 char processor_name[128];
28 MPI_Init (&argc, &argv);
29 MPI_Comm_size (comm, &nprocs);
30 MPI_Comm_rank (comm, &rank);
31 MPI_Get_processor_name (processor_name, &namelen);
32 printf ("(%d) is alive on %s\n", rank, processor_name);
35 memset (buf0, 0, buf_size);
36 memset (buf1, 1, buf_size);
44 MPI_Bcast (buf0, buf_size, MPI_INT, 1, comm); /* note that I didn't use root == 0 */
50 MPI_Bcast (buf0, buf_size, MPI_INT, 1, comm);
54 printf ("(%d) Finished normally\n", rank);