void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
{
MPI_Request request;
- Colls::igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, &request);
+ Colls::igather(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, &request, 0);
return Request::wait(&request, MPI_STATUS_IGNORE);
}
/* arbitrarily choose root as rank 0 */
int size = comm->size();
int count = 0;
- int *displs = xbt_new(int, size);
+ int* displs = new int[size];
for (int i = 0; i < size; i++) {
displs[i] = count;
count += recvcounts[i];
}
- void *tmpbuf = static_cast<void*>(smpi_get_tmp_sendbuffer(count*datatype->get_extent()));
+ unsigned char* tmpbuf = smpi_get_tmp_sendbuffer(count * datatype->get_extent());
int ret = Coll_reduce_default::reduce(sendbuf, tmpbuf, count, datatype, op, 0, comm);
if(ret==MPI_SUCCESS)
ret = Colls::scatterv(tmpbuf, recvcounts, displs, datatype, recvbuf, recvcounts[rank], datatype, 0, comm);
- xbt_free(displs);
+ delete[] displs;
smpi_free_tmp_buffer(tmpbuf);
return ret;
}
const int *recvcounts, const int *displs, MPI_Datatype recvtype, MPI_Comm comm)
{
MPI_Request request;
- Colls::iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, &request);
+ Colls::iallgatherv(sendbuf, sendcount, sendtype, recvbuf, recvcounts, displs, recvtype, comm, &request, 0);
MPI_Request* requests = request->get_nbc_requests();
int count = request->get_nbc_requests_size();
Request::waitall(count, requests, MPI_STATUS_IGNORE);
void *recvbuf, int recvcount, MPI_Datatype recvtype, int root, MPI_Comm comm)
{
MPI_Request request;
- Colls::iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, &request);
+ Colls::iscatter(sendbuf, sendcount, sendtype, recvbuf, recvcount, recvtype, root, comm, &request, 0);
return Request::wait(&request, MPI_STATUS_IGNORE);
}
return Coll_reduce_ompi_basic_linear::reduce(sendbuf, recvbuf, count, datatype, op, root, comm);
}
MPI_Request request;
- Colls::ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, &request);
+ Colls::ireduce(sendbuf, recvbuf, count, datatype, op, root, comm, &request, 0);
return Request::wait(&request, MPI_STATUS_IGNORE);
}
void *recvbuf, const int *recvcounts, const int *recvdisps, MPI_Datatype recvtype, MPI_Comm comm)
{
MPI_Request request;
- Colls::ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, &request);
+ Colls::ialltoallv(sendbuf, sendcounts, senddisps, sendtype, recvbuf, recvcounts, recvdisps, recvtype, comm, &request, 0);
return Request::wait(&request, MPI_STATUS_IGNORE);
}