Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
kill an example with a very strange license
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 15 Apr 2010 16:21:31 +0000 (16:21 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 15 Apr 2010 16:21:31 +0000 (16:21 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7606 48e7efb5-ca39-0410-a469-dd3cf9ba447f

examples/smpi/CMakeLists.txt
examples/smpi/Makefile.am
examples/smpi/ring_c.c [deleted file]

index 368093b..32ab4d9 100644 (file)
@@ -22,7 +22,6 @@ add_executable(pingpong pingpong.c)
 add_executable(second second.c)
 add_executable(scatter scatter.c)
 add_executable(reduce reduce.c)
 add_executable(second second.c)
 add_executable(scatter scatter.c)
 add_executable(reduce reduce.c)
-add_executable(ring_c ring_c.c)
 add_executable(split split.c)
 add_executable(mvmul mvmul.c)
 add_executable(smpi_sendrecv sendrecv.c)
 add_executable(split split.c)
 add_executable(mvmul mvmul.c)
 add_executable(smpi_sendrecv sendrecv.c)
index 10a3697..0b11def 100644 (file)
@@ -14,7 +14,7 @@
 #    <simgrid>/tools/tesh/README.tesh
 #  - List the tesh file in the TESTS variable so that it gets tested on make check
 
 #    <simgrid>/tools/tesh/README.tesh
 #  - List the tesh file in the TESTS variable so that it gets tested on make check
 
-noinst_PROGRAMS = allreduce bcast bcbench compute compute2 compute3 first pingpong second sendrecv mvmul ring_c split scatter reduce 
+noinst_PROGRAMS = allreduce bcast bcbench compute compute2 compute3 first pingpong second sendrecv mvmul split scatter reduce 
 
 alltoall2: alltoall2.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 
 alltoall2: alltoall2.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
@@ -44,8 +44,6 @@ scatter: scatter.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 reduce: reduce.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 reduce: reduce.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
-ring_c: ring_c.c
-       $(top_builddir)/src/smpi/smpicc $^ -o $@
 split: split.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 mvmul: mvmul.c
 split: split.c
        $(top_builddir)/src/smpi/smpicc $^ -o $@
 mvmul: mvmul.c
diff --git a/examples/smpi/ring_c.c b/examples/smpi/ring_c.c
deleted file mode 100644 (file)
index 1d91408..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
- *                         University Research and Technology
- *                         Corporation.  All rights reserved.
- * Copyright (c) 2006      Cisco Systems, Inc.  All rights reserved.
- *
- * Simple ring test program
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <mpi.h>
-
-int main(int argc, char *argv[])
-{
-  int rank, size, next, prev, message, tag = 201;
-
-  /* Start up MPI */
-
-  MPI_Init(&argc, &argv);
-  MPI_Comm_rank(MPI_COMM_WORLD, &rank);
-  MPI_Comm_size(MPI_COMM_WORLD, &size);
-
-  /* Calculate the rank of the next process in the ring.  Use the
-     modulus operator so that the last process "wraps around" to
-     rank zero. */
-
-  next = (rank + 1) % size;
-  prev = (rank + size - 1) % size;
-
-  /* If we are the "master" process (i.e., MPI_COMM_WORLD rank 0),
-     put the number of times to go around the ring in the
-     message. */
-
-  if (0 == rank) {
-    message = 10;
-
-    printf("Process 0 sending %d to %d, tag %d (%d processes in ring)\n",
-           message, next, tag, size);
-    MPI_Send(&message, 1, MPI_INT, next, tag, MPI_COMM_WORLD);
-    printf("Process 0 sent to %d\n", next);
-  }
-
-  /* Pass the message around the ring.  The exit mechanism works as
-     follows: the message (a positive integer) is passed around the
-     ring.  Each time it passes rank 0, it is decremented.  When
-     each processes receives a message containing a 0 value, it
-     passes the message on to the next process and then quits.  By
-     passing the 0 message first, every process gets the 0 message
-     and can quit normally. */
-
-  sleep(3);
-
-  while (1) {
-    MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD,
-             MPI_STATUS_IGNORE);
-
-    if (0 == rank) {
-      --message;
-      printf("Process 0 decremented value: %d\n", message);
-    }
-
-    MPI_Send(&message, 1, MPI_INT, next, tag, MPI_COMM_WORLD);
-    if (0 == message) {
-      printf("Process %d exiting\n", rank);
-      break;
-    }
-  }
-
-  /* The last process does one extra send to process 0, which needs
-     to be received before the program can exit */
-
-  if (0 == rank) {
-    MPI_Recv(&message, 1, MPI_INT, prev, tag, MPI_COMM_WORLD,
-             MPI_STATUS_IGNORE);
-  }
-
-  /* All done */
-
-  MPI_Finalize();
-  return 0;
-}