-int PMPI_Reduce_scatter_block(void *sendbuf, void *recvbuf, int recvcount,
- MPI_Datatype datatype, MPI_Op op, MPI_Comm comm)
-{
- int retval;
- smpi_bench_end();
-
- if (comm == MPI_COMM_NULL) {
- retval = MPI_ERR_COMM;
- } else if (not datatype->is_valid()) {
- retval = MPI_ERR_TYPE;
- } else if (op == MPI_OP_NULL) {
- retval = MPI_ERR_OP;
- } else if (recvcount < 0) {
- retval = MPI_ERR_ARG;
- } else {
- int count = comm->size();
-
- int rank = comm != MPI_COMM_NULL ? smpi_process()->index() : -1;
- instr_extra_data extra = xbt_new0(s_instr_extra_data_t, 1);
- extra->type = TRACING_REDUCE_SCATTER;
- extra->num_processes = count;
- int known = 0;
- extra->datatype1 = encode_datatype(datatype, &known);
- int dt_size_send = 1;
- if (known == 0)
- dt_size_send = datatype->size();
- extra->send_size = 0;
- extra->recvcounts = xbt_new(int, count);
- for (int i = 0; i < count; i++) // copy data to avoid bad free
- extra->recvcounts[i] = recvcount * dt_size_send;
- void* sendtmpbuf = sendbuf;
- if (sendbuf == MPI_IN_PLACE) {
- sendtmpbuf = static_cast<void*>(xbt_malloc(recvcount * count * datatype->size()));
- memcpy(sendtmpbuf, recvbuf, recvcount * count * datatype->size());
- }
-
- TRACE_smpi_collective_in(rank, __FUNCTION__, extra);
-
- int* recvcounts = static_cast<int*>(xbt_malloc(count * sizeof(int)));
- for (int i = 0; i < count; i++)
- recvcounts[i] = recvcount;
- simgrid::smpi::Colls::reduce_scatter(sendtmpbuf, recvbuf, recvcounts, datatype, op, comm);
- xbt_free(recvcounts);
- retval = MPI_SUCCESS;
+int PMPI_Alltoall(const void* sendbuf, int sendcount, MPI_Datatype sendtype, void* recvbuf, int recvcount,
+ MPI_Datatype recvtype, MPI_Comm comm){
+ return PMPI_Ialltoall(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, comm, MPI_REQUEST_IGNORED);
+}