[mpich2-commits] r7746 - mpich2/trunk/src/mpi/coll

balaji at mcs.anl.gov balaji at mcs.anl.gov
Tue Jan 18 16:45:08 CST 2011


Author: balaji
Date: 2011-01-18 16:45:07 -0600 (Tue, 18 Jan 2011)
New Revision: 7746

Modified:
   mpich2/trunk/src/mpi/coll/alltoallv.c
Log:
Rename send_size to sendtype_size for consistency.

Modified: mpich2/trunk/src/mpi/coll/alltoallv.c
===================================================================
--- mpich2/trunk/src/mpi/coll/alltoallv.c	2011-01-18 22:17:25 UTC (rev 7745)
+++ mpich2/trunk/src/mpi/coll/alltoallv.c	2011-01-18 22:45:07 UTC (rev 7746)
@@ -67,7 +67,7 @@
 	MPID_Comm *comm_ptr )
 {
     int        comm_size, i, j;
-    MPI_Aint   send_extent, recv_extent, send_size, recv_size;
+    MPI_Aint   send_extent, recv_extent, sendtype_size, recvtype_size;
     int        mpi_errno = MPI_SUCCESS;
     MPI_Status *starray;
     MPI_Status status;
@@ -86,8 +86,8 @@
     /* Get extent of send and recv types */
     MPID_Datatype_get_extent_macro(sendtype, send_extent);
     MPID_Datatype_get_extent_macro(recvtype, recv_extent);
-    MPID_Datatype_get_size_macro(sendtype, send_size);
-    MPID_Datatype_get_size_macro(recvtype, recv_size);
+    MPID_Datatype_get_size_macro(sendtype, sendtype_size);
+    MPID_Datatype_get_size_macro(recvtype, recvtype_size);
     
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
@@ -105,7 +105,7 @@
         for (i = 0; i < comm_size; ++i) {
             /* start inner loop at i to avoid re-exchanging data */
             for (j = i; j < comm_size; ++j) {
-                if (rank == i && (recvcnts[j] * recv_size)) {
+                if (rank == i && (recvcnts[j] * recvtype_size)) {
                     /* also covers the (rank == i && rank == j) case */
                     mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[j]*recv_extent),
                                                       recvcnts[j], recvtype,
@@ -114,7 +114,7 @@
                                                       comm, &status);
                     if (mpi_errno) MPIU_ERR_POP(mpi_errno);
                 }
-                else if (rank == j && (recvcnts[i] * recv_size)) {
+                else if (rank == j && (recvcnts[i] * recvtype_size)) {
                     /* same as above with i/j args reversed */
                     mpi_errno = MPIC_Sendrecv_replace(((char *)recvbuf + rdispls[i]*recv_extent),
                                                       recvcnts[i], recvtype,
@@ -141,7 +141,7 @@
             /* do the communication -- post ss sends and receives: */
             for ( i=0; i<ss; i++ ) { 
                 dst = (rank+i+ii) % comm_size;
-                if (recvcnts[dst] * recv_size) {
+                if (recvcnts[dst] * recvtype_size) {
                     MPID_Datatype_get_size_macro(recvtype, type_size);
                     if (type_size) {
                         MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT recvbuf +
@@ -158,7 +158,7 @@
 
             for ( i=0; i<ss; i++ ) { 
                 dst = (rank-i-ii+comm_size) % comm_size;
-                if (sendcnts[dst] * send_size) {
+                if (sendcnts[dst] * sendtype_size) {
                     MPID_Datatype_get_size_macro(sendtype, type_size);
                     if (type_size) {
                         MPID_Ensure_Aint_fits_in_pointer(MPI_VOID_PTR_CAST_TO_MPI_AINT sendbuf +
@@ -230,7 +230,7 @@
 
 */
     int local_size, remote_size, max_size, i;
-    MPI_Aint   send_extent, recv_extent, send_size, recv_size;
+    MPI_Aint   send_extent, recv_extent, sendtype_size, recvtype_size;
     int        mpi_errno = MPI_SUCCESS;
     MPI_Status status;
     int src, dst, rank, sendcount, recvcount;
@@ -245,8 +245,8 @@
     /* Get extent of send and recv types */
     MPID_Datatype_get_extent_macro(sendtype, send_extent);
     MPID_Datatype_get_extent_macro(recvtype, recv_extent);
-    MPID_Datatype_get_size_macro(sendtype, send_size);
-    MPID_Datatype_get_size_macro(recvtype, recv_size);
+    MPID_Datatype_get_size_macro(sendtype, sendtype_size);
+    MPID_Datatype_get_size_macro(recvtype, recvtype_size);
     
     /* check if multiple threads are calling this collective function */
     MPIDU_ERR_CHECK_MULTIPLE_THREADS_ENTER( comm_ptr );
@@ -279,9 +279,9 @@
             sendcount = sendcnts[dst];
         }
 
-        if (sendcount * send_size == 0)
+        if (sendcount * sendtype_size == 0)
             dst = MPI_PROC_NULL;
-        if (recvcount * recv_size == 0)
+        if (recvcount * recvtype_size == 0)
             src = MPI_PROC_NULL;
         mpi_errno = MPIC_Sendrecv(sendaddr, sendcount, sendtype, dst, 
                                   MPIR_ALLTOALLV_TAG, recvaddr, recvcount, 



More information about the mpich2-commits mailing list