Commit 5b188897 authored by Rajeev Thakur's avatar Rajeev Thakur
Browse files

[svn-r3262] fixed bug in SMP-aware allreduce

parent 6d1c4294
......@@ -715,6 +715,14 @@ int MPI_Allreduce ( void *sendbuf, void *recvbuf, int count,
}
if (mpi_errno) goto fn_fail;
}
else {
/* only one process on the node. copy sendbuf to recvbuf */
if (sendbuf != MPI_IN_PLACE) {
mpi_errno = MPIR_Localcopy(sendbuf, count, datatype,
recvbuf, count, datatype);
if (mpi_errno) goto fn_fail;
}
}
/* now do an IN_PLACE allreduce among the local roots of all nodes */
if (comm_ptr->node_roots_comm != NULL) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment