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.
11 int main(int argc, char *argv[])
14 int newrank, merr, rank;
15 int index[2], edges[2];
17 MTest_Init(&argc, &argv);
19 MPI_Comm_rank(MPI_COMM_WORLD, &rank);
20 /* Graph map where there are no nodes for this process */
21 MPI_Comm_set_errhandler(MPI_COMM_WORLD, MPI_ERRORS_RETURN);
22 /* Here is a singleton graph, containing only the root process */
25 merr = MPI_Graph_map(MPI_COMM_WORLD, 1, index, edges, &newrank);
28 printf("Graph map returned an error\n");
29 MTestPrintError(merr);
31 if (rank != 0 && newrank != MPI_UNDEFINED) {
33 printf("Graph map with no local nodes did not return MPI_UNDEFINED\n");