Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
keep on removing useless algorithms
authorAugustin Degomme <degomme@idpann.imag.fr>
Wed, 18 Sep 2013 09:05:11 +0000 (11:05 +0200)
committerAugustin Degomme <degomme@idpann.imag.fr>
Wed, 18 Sep 2013 14:12:37 +0000 (16:12 +0200)
buildtools/Cmake/AddTests.cmake
buildtools/Cmake/DefinePackages.cmake
src/smpi/colls/alltoall-ompi-pairwise.c [deleted file]
src/smpi/colls/alltoall-simple.c [deleted file]
src/smpi/colls/colls.h
src/smpi/colls/smpi_mpich_selector.c
src/smpi/colls/smpi_openmpi_selector.c

index 24ef7a3..dfacbc3 100644 (file)
@@ -417,7 +417,7 @@ if(NOT enable_memcheck)
     FOREACH (ALLTOALL_COLL 2dmesh 3dmesh pair pair_one_barrier pair_light_barrier
                            pair_mpi_barrier rdb ring ring_light_barrier
                            ring_mpi_barrier ring_one_barrier
     FOREACH (ALLTOALL_COLL 2dmesh 3dmesh pair pair_one_barrier pair_light_barrier
                            pair_mpi_barrier rdb ring ring_light_barrier
                            ring_mpi_barrier ring_one_barrier
-                           simple bruck basic_linear ompi mpich ompi_pairwise)
+                           bruck basic_linear ompi mpich)
       ADD_TEST(smpi-alltoall-coll-${ALLTOALL_COLL} ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg smpi/alltoall:${ALLTOALL_COLL} --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/alltoall_coll.tesh)
     ENDFOREACH()
 
       ADD_TEST(smpi-alltoall-coll-${ALLTOALL_COLL} ${CMAKE_BINARY_DIR}/bin/tesh ${TESH_OPTION} --cfg smpi/alltoall:${ALLTOALL_COLL} --cd ${CMAKE_BINARY_DIR}/teshsuite/smpi ${CMAKE_HOME_DIRECTORY}/teshsuite/smpi/alltoall_coll.tesh)
     ENDFOREACH()
 
index 7a749a6..b6359c4 100644 (file)
@@ -162,8 +162,6 @@ set(SMPI_SRC
   src/smpi/colls/alltoall-ring-light-barrier.c
   src/smpi/colls/alltoall-ring-mpi-barrier.c
   src/smpi/colls/alltoall-ring-one-barrier.c
   src/smpi/colls/alltoall-ring-light-barrier.c
   src/smpi/colls/alltoall-ring-mpi-barrier.c
   src/smpi/colls/alltoall-ring-one-barrier.c
-  src/smpi/colls/alltoall-simple.c
-  src/smpi/colls/alltoall-ompi-pairwise.c
   src/smpi/colls/alltoallv-pair.c   
   src/smpi/colls/alltoallv-pair-light-barrier.c
   src/smpi/colls/alltoallv-pair-mpi-barrier.c
   src/smpi/colls/alltoallv-pair.c   
   src/smpi/colls/alltoallv-pair-light-barrier.c
   src/smpi/colls/alltoallv-pair-mpi-barrier.c
diff --git a/src/smpi/colls/alltoall-ompi-pairwise.c b/src/smpi/colls/alltoall-ompi-pairwise.c
deleted file mode 100644 (file)
index 8daee00..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
- *                         University Research and Technology
- *                         Corporation.  All rights reserved.
- * Copyright (c) 2004-2006 The University of Tennessee and The University
- *                         of Tennessee Research Foundation.  All rights
- *                         reserved.
- * Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
- *                         University of Stuttgart.  All rights reserved.
- * Copyright (c) 2004-2005 The Regents of the University of California.
- *                         All rights reserved.
- * $COPYRIGHT$
- *
- * Additional copyrights may follow
- *
- * $HEADER$
- */
-
-#include "colls_private.h"
-
-int smpi_coll_tuned_alltoall_ompi_pairwise(void *sbuf, int scount, 
-                                            MPI_Datatype sdtype,
-                                            void* rbuf, int rcount,
-                                            MPI_Datatype rdtype,
-                                            MPI_Comm comm)
-{
-    int rank, size, step;
-    int sendto, recvfrom;
-    void * tmpsend, *tmprecv;
-    MPI_Aint lb, sext, rext;
-
-    size = smpi_comm_size(comm);
-    rank = smpi_comm_rank(comm);
-
-    XBT_VERB(
-                 "coll:tuned:alltoall_ompi_pairwise rank %d", rank);
-
-    smpi_datatype_extent (sdtype, &lb, &sext);
-    smpi_datatype_extent (rdtype, &lb, &rext);
-
-    
-    /* Perform pairwise exchange - starting from 1 so the local copy is last */
-    for (step = 1; step < size + 1; step++) {
-
-        /* Determine sender and receiver for this step. */
-        sendto  = (rank + step) % size;
-        recvfrom = (rank + size - step) % size;
-
-        /* Determine sending and receiving locations */
-        tmpsend = (char*)sbuf + sendto * sext * scount;
-        tmprecv = (char*)rbuf + recvfrom * rext * rcount;
-
-        /* send and receive */
-        smpi_mpi_sendrecv( tmpsend, scount, sdtype, sendto, 
-                                        COLL_TAG_ALLTOALL,
-                                        tmprecv, rcount, rdtype, recvfrom, 
-                                        COLL_TAG_ALLTOALL,
-                                        comm, MPI_STATUS_IGNORE);
-    }
-
-    return MPI_SUCCESS;
-}
diff --git a/src/smpi/colls/alltoall-simple.c b/src/smpi/colls/alltoall-simple.c
deleted file mode 100644 (file)
index 1d813e4..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#include "colls_private.h"
-
-/*****************************************************************************
-
- * Function: alltoall_spreading_simple
-
- * Return: int
-
- *  Inputs:
-    send_buff: send input buffer
-    send_count: number of elements to send
-    send_type: data type of elements being sent
-    recv_buff: receive output buffer
-    recv_count: number of elements to received
-    recv_type: data type of elements being received
-    comm: communicator
-
- * Descrp: Let i -> j denote the communication from node i to node j. The
-          order of communications for node i is i -> i + 1, i -> i + 2, ...,
-          i -> (i + p -1) % P.
- * Auther: Ahmad Faraj
-
- ****************************************************************************/
-int smpi_coll_tuned_alltoall_simple(void *send_buff, int send_count,
-                                    MPI_Datatype send_type,
-                                    void *recv_buff, int recv_count,
-                                    MPI_Datatype recv_type, MPI_Comm comm)
-{
-  int i, rank, size, nreqs, src, dst, tag = COLL_TAG_ALLTOALL;
-  char *psnd;
-  char *prcv;
-  MPI_Aint sndinc;
-  MPI_Aint rcvinc;
-  MPI_Request *req;
-  MPI_Request *preq;
-  MPI_Request *qreq;
-  MPI_Status s, *statuses;
-
-
-  size = smpi_comm_size(comm);
-  rank = smpi_comm_rank(comm);
-  sndinc = smpi_datatype_get_extent(send_type);
-  rcvinc = smpi_datatype_get_extent(recv_type);
-  sndinc *= send_count;
-  rcvinc *= recv_count;
-
-  /* Allocate arrays of requests. */
-
-  nreqs = 2 * (size - 1);
-  if (nreqs > 0) {
-    req = (MPI_Request *) xbt_malloc(nreqs * sizeof(MPI_Request));
-    statuses = (MPI_Status *) xbt_malloc(nreqs * sizeof(MPI_Status));
-  } else {
-    req = NULL;
-    statuses = NULL;
-  }
-
-  /* simple optimization */
-
-  psnd = ((char *) send_buff) + (rank * sndinc);
-  prcv = ((char *) recv_buff) + (rank * rcvinc);
-  smpi_mpi_sendrecv(psnd, send_count, send_type, rank, tag,
-               prcv, recv_count, recv_type, rank, tag, comm, &s);
-
-
-  /* Initiate all send/recv to/from others. */
-
-  preq = req;
-  qreq = req + size - 1;
-  prcv = (char *) recv_buff;
-  psnd = (char *) send_buff;
-  for (i = 0; i < size; i++) {
-    src = dst = (rank + i) % size;
-    if (src == rank)
-      continue;
-    if (dst == rank)
-      continue;
-    *(preq++) = smpi_mpi_recv_init(prcv + (src * rcvinc), recv_count, recv_type, src,
-                  tag, comm);
-    *(qreq++) = smpi_mpi_send_init(psnd + (dst * sndinc), send_count, send_type, dst,
-                  tag, comm);
-  }
-
-  /* Start all the requests. */
-
-  smpi_mpi_startall(nreqs, req);
-
-  /* Wait for them all. */
-
-  smpi_mpi_waitall(nreqs, req, statuses);
-
-
-  /* All done */
-  for(i= 0;i<nreqs;i++)if(req[i])smpi_mpi_request_free(&req[i]);
-  if (req)
-    xbt_free((char *) req);
-  if (statuses)
-    xbt_free(statuses);
-  return MPI_SUCCESS;
-}
index 3e01954..c80fdd5 100644 (file)
@@ -142,10 +142,8 @@ COLL_APPLY(action, COLL_ALLTOALL_SIG, ring) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_light_barrier) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_mpi_barrier) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_one_barrier) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_light_barrier) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_mpi_barrier) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ring_one_barrier) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, simple) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, mpich) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, mpich) COLL_sep \
-COLL_APPLY(action, COLL_ALLTOALL_SIG, ompi_pairwise) COLL_sep \
 COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
 
 COLL_ALLTOALLS(COLL_PROTO, COLL_NOsep)
 COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
 
 COLL_ALLTOALLS(COLL_PROTO, COLL_NOsep)
index d999646..7ebc7dd 100644 (file)
@@ -167,7 +167,7 @@ int smpi_coll_tuned_alltoall_mpich( void *sbuf, int scount,
                                                     comm);
 
     } else if (block_dsize < medium_size) {
                                                     comm);
 
     } else if (block_dsize < medium_size) {
-        return smpi_coll_tuned_alltoall_simple(sbuf, scount, sdtype, 
+        return smpi_coll_tuned_alltoall_basic_linear(sbuf, scount, sdtype, 
                                                            rbuf, rcount, rdtype, 
                                                            comm);
     }else if (communicator_size%2){
                                                            rbuf, rcount, rdtype, 
                                                            comm);
     }else if (communicator_size%2){
@@ -176,7 +176,7 @@ int smpi_coll_tuned_alltoall_mpich( void *sbuf, int scount,
                                                            comm);
     }
 
                                                            comm);
     }
 
-    return smpi_coll_tuned_alltoall_ompi_pairwise (sbuf, scount, sdtype,
+    return smpi_coll_tuned_alltoall_ring (sbuf, scount, sdtype,
                                                     rbuf, rcount, rdtype,
                                                     comm);
 }
                                                     rbuf, rcount, rdtype,
                                                     comm);
 }
index 2319633..b24a7f4 100644 (file)
@@ -76,12 +76,12 @@ int smpi_coll_tuned_alltoall_ompi( void *sbuf, int scount,
                                                     comm);
 
     } else if (block_dsize < 3000) {
                                                     comm);
 
     } else if (block_dsize < 3000) {
-        return smpi_coll_tuned_alltoall_simple(sbuf, scount, sdtype, 
+        return smpi_coll_tuned_alltoall_basic_linear(sbuf, scount, sdtype, 
                                                            rbuf, rcount, rdtype, 
                                                            comm);
     }
 
                                                            rbuf, rcount, rdtype, 
                                                            comm);
     }
 
-    return smpi_coll_tuned_alltoall_ompi_pairwise (sbuf, scount, sdtype, 
+    return smpi_coll_tuned_alltoall_ring (sbuf, scount, sdtype, 
                                                     rbuf, rcount, rdtype,
                                                     comm);
 }
                                                     rbuf, rcount, rdtype,
                                                     comm);
 }