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()
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
+++ /dev/null
-/*
- * 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;
-}
+++ /dev/null
-#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;
-}
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_pairwise) COLL_sep \
COLL_APPLY(action, COLL_ALLTOALL_SIG, automatic)
COLL_ALLTOALLS(COLL_PROTO, COLL_NOsep)
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){
comm);
}
- return smpi_coll_tuned_alltoall_ompi_pairwise (sbuf, scount, sdtype,
+ return smpi_coll_tuned_alltoall_ring (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
comm);
}
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);
}
- return smpi_coll_tuned_alltoall_ompi_pairwise (sbuf, scount, sdtype,
+ return smpi_coll_tuned_alltoall_ring (sbuf, scount, sdtype,
rbuf, rcount, rdtype,
comm);
}