[mpich2-commits] r3956 - mpich2/trunk/src/mpi/coll
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Fri Mar 6 13:29:28 CST 2009
Author: goodell
Date: 2009-03-06 13:29:28 -0600 (Fri, 06 Mar 2009)
New Revision: 3956
Modified:
mpich2/trunk/src/mpi/coll/gatherv.c
Log:
Fix a warning and a minor bug in gatherv relating to communicator size.
Reviewed by balaji at .
Modified: mpich2/trunk/src/mpi/coll/gatherv.c
===================================================================
--- mpich2/trunk/src/mpi/coll/gatherv.c 2009-03-06 18:46:55 UTC (rev 3955)
+++ mpich2/trunk/src/mpi/coll/gatherv.c 2009-03-06 19:29:28 UTC (rev 3956)
@@ -53,7 +53,7 @@
MPID_Comm *comm_ptr )
{
static const char FCNAME[] = "MPIR_Gatherv";
- int comm_size, rank, remote_comm_size;
+ int comm_size, rank;
int mpi_errno = MPI_SUCCESS;
MPI_Comm comm;
MPI_Aint extent;
@@ -121,6 +121,11 @@
else if (root != MPI_PROC_NULL) { /* non-root nodes, and in the intercomm. case, non-root nodes on remote side */
if (sendcnt) {
+ /* we want local size in both the intracomm and intercomm cases
+ because the size of the root's group (group A in the standard) is
+ irrelevant here. */
+ comm_size = comm_ptr->local_size;
+
if (comm_size >= MPIR_GATHERV_MIN_PROCS) {
mpi_errno = MPIC_Ssend(sendbuf, sendcnt, sendtype, root,
MPIR_GATHERV_TAG, comm);
More information about the mpich2-commits
mailing list