From 93df6d6b4888ae066e007a761cfa2df449f13b2c Mon Sep 17 00:00:00 2001 From: mquinson Date: Thu, 15 Apr 2010 16:21:31 +0000 Subject: [PATCH] kill an example with a very strange license git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7606 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- examples/smpi/CMakeLists.txt | 1 - examples/smpi/Makefile.am | 4 +- examples/smpi/ring_c.c | 82 ------------------------------------ 3 files changed, 1 insertion(+), 86 deletions(-) delete mode 100644 examples/smpi/ring_c.c diff --git a/examples/smpi/CMakeLists.txt b/examples/smpi/CMakeLists.txt index 368093be63..32ab4d9e04 100644 --- a/examples/smpi/CMakeLists.txt +++ b/examples/smpi/CMakeLists.txt @@ -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(ring_c ring_c.c) add_executable(split split.c) add_executable(mvmul mvmul.c) add_executable(smpi_sendrecv sendrecv.c) diff --git a/examples/smpi/Makefile.am b/examples/smpi/Makefile.am index 10a3697333..0b11defa80 100644 --- a/examples/smpi/Makefile.am +++ b/examples/smpi/Makefile.am @@ -14,7 +14,7 @@ # /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 $@ @@ -44,8 +44,6 @@ scatter: scatter.c $(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 diff --git a/examples/smpi/ring_c.c b/examples/smpi/ring_c.c deleted file mode 100644 index 1d91408da2..0000000000 --- a/examples/smpi/ring_c.c +++ /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 -#include -#include - -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; -} -- 2.20.1