2 /* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
4 /* group-no-error.c -- construct a group and free it */
8 "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-error.c,v 1.2 2003/01/13 18:31:48 bronis Exp $";
18 main (int argc, char **argv)
22 char processor_name[128];
24 MPI_Group newgroup, newgroup2;
27 MPI_Init (&argc, &argv);
28 MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
29 MPI_Comm_rank (MPI_COMM_WORLD, &rank);
30 MPI_Get_processor_name (processor_name, &namelen);
31 printf ("(%d) is alive on %s\n", rank, processor_name);
34 MPI_Barrier (MPI_COMM_WORLD);
35 MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
36 MPI_Group_free (&newgroup);
37 MPI_Barrier (MPI_COMM_WORLD);
38 /* now with an alias... */
39 MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
41 MPI_Group_free (&newgroup2);
42 MPI_Barrier (MPI_COMM_WORLD);
43 printf ("(%d) Finished normally\n", rank);