From: Augustin Degomme Date: Wed, 18 Sep 2013 09:05:11 +0000 (+0200) Subject: keep on removing useless algorithms X-Git-Tag: v3_9_90~115 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/94e61a6926e7eb193363e147ff22206f77425abe keep on removing useless algorithms --- diff --git a/buildtools/Cmake/AddTests.cmake b/buildtools/Cmake/AddTests.cmake index 24ef7a3fd3..dfacbc3ff0 100644 --- a/buildtools/Cmake/AddTests.cmake +++ b/buildtools/Cmake/AddTests.cmake @@ -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 - 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() diff --git a/buildtools/Cmake/DefinePackages.cmake b/buildtools/Cmake/DefinePackages.cmake index 7a749a6a4f..b6359c4a1e 100644 --- a/buildtools/Cmake/DefinePackages.cmake +++ b/buildtools/Cmake/DefinePackages.cmake @@ -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-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 diff --git a/src/smpi/colls/alltoall-ompi-pairwise.c b/src/smpi/colls/alltoall-ompi-pairwise.c deleted file mode 100644 index 8daee00055..0000000000 --- a/src/smpi/colls/alltoall-ompi-pairwise.c +++ /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 index 1d813e4013..0000000000 --- a/src/smpi/colls/alltoall-simple.c +++ /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