Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Ignore stdout/stderr of the umpire tests
[simgrid.git] / teshsuite / smpi / isp / umpire / group-no-free.c
1 /* -*- Mode: C; -*- */
2 /* Creator: Bronis R. de Supinski (bronis@llnl.gov) */
3
4 /* group-no-free.c -- construct a group without freeing */
5
6 #ifndef lint
7 static char *rcsid =
8   "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/group-no-free.c,v 1.2 2003/01/13 18:31:48 bronis Exp $";
9 #endif
10
11
12 #include <stdio.h>
13 #include <string.h>
14 #include "mpi.h"
15
16 #define buf_size 128
17
18 int
19 main (int argc, char **argv)
20 {
21   int nprocs = -1;
22   int rank = -1;
23   char processor_name[128];
24   int namelen = 128;
25   MPI_Group newgroup;
26
27   /* init */
28   MPI_Init (&argc, &argv);
29   MPI_Comm_size (MPI_COMM_WORLD, &nprocs);
30   MPI_Comm_rank (MPI_COMM_WORLD, &rank);
31   MPI_Get_processor_name (processor_name, &namelen);
32   printf ("(%d) is alive on %s\n", rank, processor_name);
33   fflush (stdout);
34
35   MPI_Barrier (MPI_COMM_WORLD);
36   MPI_Comm_group (MPI_COMM_WORLD, &newgroup);
37   MPI_Barrier (MPI_COMM_WORLD);
38   printf ("(%d) Finished normally\n", rank);
39   MPI_Finalize ();
40 }
41
42 /* EOF */