X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/f186fd6470cd6853b97c53782c710745c628e810..28335d43a1e64d3a412e8d6b86e59a389852b0d1:/teshsuite/smpi/isp/umpire/remote_group-no-error.c diff --git a/teshsuite/smpi/isp/umpire/remote_group-no-error.c b/teshsuite/smpi/isp/umpire/remote_group-no-error.c deleted file mode 100644 index e62fc50270..0000000000 --- a/teshsuite/smpi/isp/umpire/remote_group-no-error.c +++ /dev/null @@ -1,101 +0,0 @@ -/* -*- Mode: C; -*- */ -/* Creator: Bronis R. de Supinski (bronis@llnl.gov) */ - -/* type-no-error-exhaustive.c -- use all group constructors correctly */ - -#ifndef lint -static char *rcsid = - "$Header: /usr/gapps/asde/cvs-vault/umpire/tests/remote_group-no-error.c,v 1.1 2002/07/30 21:34:43 bronis Exp $"; -#endif - -#include -#include -#include "mpi.h" - - -#define INTERCOMM_CREATE_TAG 666 - - -int -main (int argc, char **argv) -{ - int nprocs = -1; - int rank = -1; - MPI_Comm comm = MPI_COMM_WORLD; - char processor_name[128]; - int namelen = 128; - int i; - MPI_Group newgroup; - MPI_Group newgroup2; - MPI_Comm temp; - MPI_Comm intercomm = MPI_COMM_NULL; - - /* init */ - MPI_Init (&argc, &argv); - MPI_Comm_size (comm, &nprocs); - MPI_Comm_rank (comm, &rank); - MPI_Get_processor_name (processor_name, &namelen); - printf ("(%d) is alive on %s\n", rank, processor_name); - fflush (stdout); - - MPI_Barrier (comm); - - if (nprocs < 3) { - printf ("requires at least 3 tasks\n"); - } - else { - /* create the groups */ - /* need lots of stuff for this constructor... */ - MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp); - - if (rank % 3) { - MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, - (((nprocs % 3) == 2) && ((rank % 3) == 2)) ? - nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3), - INTERCOMM_CREATE_TAG, &intercomm); - - MPI_Comm_remote_group (intercomm, &newgroup); - - MPI_Comm_free (&intercomm); - } - else { - MPI_Comm_group (temp, &newgroup); - } - - MPI_Comm_free (&temp); - - MPI_Group_free (&newgroup); - - MPI_Barrier (comm); - - /* create the groups again and free with an alias... */ - /* need lots of stuff for this constructor... */ - MPI_Comm_split (MPI_COMM_WORLD, rank % 3, nprocs - rank, &temp); - - if (rank % 3) { - MPI_Intercomm_create (temp, 0, MPI_COMM_WORLD, - (((nprocs % 3) == 2) && ((rank % 3) == 2)) ? - nprocs - 1 : nprocs - (rank % 3) - (nprocs % 3), - INTERCOMM_CREATE_TAG, &intercomm); - - MPI_Comm_remote_group (intercomm, &newgroup); - - MPI_Comm_free (&intercomm); - } - else { - MPI_Comm_group (temp, &newgroup); - } - - MPI_Comm_free (&temp); - - newgroup2 = newgroup; - MPI_Group_free (&newgroup2); - } - - MPI_Barrier (comm); - - printf ("(%d) Finished normally\n", rank); - MPI_Finalize (); -} - -/* EOF */