- /* Send the message to the root if the leader is not the
- * root of the reduce operation. The reduced data is in tmp_buf */
- if ((local_rank == 0) && (root != my_rank)
- && (leader_root == leader_comm_rank)) {
- Request::send(tmp_buf, count, datatype, root,
- COLL_TAG_REDUCE+1, comm);
- }
- if ((local_rank != 0) && (root == my_rank)) {
- Request::recv(recvbuf, count, datatype,
- leader_of_root,
- COLL_TAG_REDUCE+1, comm,
- MPI_STATUS_IGNORE);
- }
- smpi_free_tmp_buffer((void *) ((char *) tmp_buf + true_lb));
+ /* Send the message to the root if the leader is not the
+ * root of the reduce operation. The reduced data is in tmp_buf */
+ if ((local_rank == 0) && (root != my_rank) && (leader_root == leader_comm_rank)) {
+ Request::send(tmp_buf, count, datatype, root, COLL_TAG_REDUCE + 1, comm);
+ }
+ if ((local_rank != 0) && (root == my_rank)) {
+ Request::recv(recvbuf, count, datatype, leader_of_root, COLL_TAG_REDUCE + 1, comm, MPI_STATUS_IGNORE);
+ }
+ smpi_free_tmp_buffer(tmp_buf + true_lb);