-/* Copyright (c) 2013-2019. The SimGrid Team.
+/* Copyright (c) 2013-2020. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
return 0;
}
-namespace simgrid{
-namespace smpi{
-int Coll_reduce_mvapich2_knomial::reduce (
+namespace simgrid {
+namespace smpi {
+int reduce__mvapich2_knomial(
const void *sendbuf,
void *recvbuf,
int count,
MPI_Comm comm)
{
int mpi_errno = MPI_SUCCESS;
- int rank, is_commutative;
+ int rank;
int src, k;
MPI_Request send_request;
int index=0;
datatype->extent(&true_lb, &true_extent);
extent = datatype->get_extent();
- is_commutative = (op==MPI_OP_NULL || op->is_commutative());
+ bool is_commutative = (op == MPI_OP_NULL || op->is_commutative());
if (rank != root) {
recvbuf = (void*)smpi_get_tmp_recvbuffer(count * std::max(extent, true_extent));
&dst, &expected_send_count, &expected_recv_count, &src_array);
if(expected_recv_count > 0 ) {
- void** tmp_buf = new void*[expected_recv_count];
+ unsigned char** tmp_buf = new unsigned char*[expected_recv_count];
MPI_Request* requests = new MPI_Request[expected_recv_count];
for (k = 0; k < expected_recv_count; k++) {
tmp_buf[k] = smpi_get_tmp_sendbuffer(count * std::max(extent, true_extent));
- tmp_buf[k] = (void*)((char*)tmp_buf[k] - true_lb);
+ tmp_buf[k] = tmp_buf[k] - true_lb;
}
while(recv_iter < expected_recv_count) {
Request::waitall(1, &send_request, &status);
- smpi_free_tmp_buffer((void *)((char*)recvbuf + true_lb));
+ smpi_free_tmp_buffer(static_cast<unsigned char*>(recvbuf) + true_lb);
}
/* --END ERROR HANDLING-- */