[mpich2-commits] r7793 - mpich2/trunk/src/mpi/coll
goodell at mcs.anl.gov
goodell at mcs.anl.gov
Thu Jan 20 16:09:23 CST 2011
Author: goodell
Date: 2011-01-20 16:09:23 -0600 (Thu, 20 Jan 2011)
New Revision: 7793
Modified:
mpich2/trunk/src/mpi/coll/alltoallv.c
Log:
don't look at sendtype in alltoallv if sendbuf==MPI_IN_PLACE
No reviewer.
Modified: mpich2/trunk/src/mpi/coll/alltoallv.c
===================================================================
--- mpich2/trunk/src/mpi/coll/alltoallv.c 2011-01-20 22:09:20 UTC (rev 7792)
+++ mpich2/trunk/src/mpi/coll/alltoallv.c 2011-01-20 22:09:23 UTC (rev 7793)
@@ -82,11 +82,10 @@
comm = comm_ptr->handle;
comm_size = comm_ptr->local_size;
rank = comm_ptr->rank;
-
- /* Get extent of send and recv types */
- MPID_Datatype_get_extent_macro(sendtype, send_extent);
+
+ /* Get extent of recv type, but send type is only valid if (sendbuf!=MPI_IN_PLACE) */
MPID_Datatype_get_extent_macro(recvtype, recv_extent);
-
+
/* check if multiple threads are calling this collective function */
MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
@@ -128,6 +127,8 @@
bblock = MPIR_PARAM_ALLTOALL_THROTTLE;
if (bblock == 0) bblock = comm_size;
+ MPID_Datatype_get_extent_macro(sendtype, send_extent);
+
MPIU_CHKLMEM_MALLOC(starray, MPI_Status*, 2*bblock*sizeof(MPI_Status), mpi_errno, "starray");
MPIU_CHKLMEM_MALLOC(reqarray, MPI_Request*, 2*bblock*sizeof(MPI_Request), mpi_errno, "reqarray");
More information about the mpich2-commits
mailing list