- return success;
-}
-
-/*#include "ompi_bindings.h"
-
-int ompi_coll_tuned_alltoall_intra_pairwise(void *sbuf, int scount,
- MPI_Datatype sdtype,
- void* rbuf, int rcount,
- MPI_Datatype rdtype,
- MPI_Comm comm)
-{
- int line = -1, err = 0;
- int rank, size, step;
- int sendto, recvfrom;
- void * tmpsend, *tmprecv;
- ptrdiff_t lb, sext, rext;
-
- size = ompi_comm_size(comm);
- rank = ompi_comm_rank(comm);
-
- OPAL_OUTPUT((ompi_coll_tuned_stream,
- "coll:tuned:alltoall_intra_pairwise rank %d", rank));
-
- err = ompi_datatype_get_extent (sdtype, &lb, &sext);
- if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; }
- err = ompi_datatype_get_extent (rdtype, &lb, &rext);
- if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; }
-
-
- // 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
- err = ompi_coll_tuned_sendrecv( tmpsend, scount, sdtype, sendto,
- MCA_COLL_BASE_TAG_ALLTOALL,
- tmprecv, rcount, rdtype, recvfrom,
- MCA_COLL_BASE_TAG_ALLTOALL,
- comm, MPI_STATUS_IGNORE, rank);
- if (err != MPI_SUCCESS) { line = __LINE__; goto err_hndl; }
- }
-
- return MPI_SUCCESS;
-
- err_hndl:
- OPAL_OUTPUT((ompi_coll_tuned_stream,
- "%s:%4d\tError occurred %d, rank %2d", __FILE__, line,
- err, rank));
- return err;