1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
4 * (C) 2003 by Argonne National Laboratory.
5 * See COPYRIGHT in top-level directory.
12 static char MTEST_Descrip[] = "Test of Win_get_group";
15 int main(int argc, char *argv[])
21 MPI_Group group, wingroup;
25 MTest_Init(&argc, &argv);
27 /* The following illustrates the use of the routines to
28 * run through a selection of communicators and datatypes.
29 * Use subsets of these for tests that do not involve combinations
30 * of communicators, datatypes, and counts of datatypes */
31 while (MTestGetIntracommGeneral(&comm, minsize, 1)) {
32 if (comm == MPI_COMM_NULL)
35 MPI_Win_create(buf, sizeof(int) * 10, sizeof(int), MPI_INFO_NULL, comm, &win);
36 MPI_Win_get_group(win, &wingroup);
37 MPI_Comm_group(comm, &group);
38 MPI_Group_compare(group, wingroup, &result);
39 if (result != MPI_IDENT) {
41 fprintf(stderr, "Group returned by Win_get_group not the same as the input group\n");
43 MPI_Group_free(&wingroup);
44 MPI_Group_free(&group);