[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.2b4-19-g9bdaca7

Service Account noreply at mpich.org
Wed Jul 29 17:23:01 CDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "MPICH primary repository".

The branch, master has been updated
       via  9bdaca745b20664c33338811ab603a92c2f8416a (commit)
      from  24bb936af9c34cc7a7230bb0b41387bdd4ec99df (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.mpich.org/mpich.git/commitdiff/9bdaca745b20664c33338811ab603a92c2f8416a

commit 9bdaca745b20664c33338811ab603a92c2f8416a
Author: Pavan Balaji <balaji at anl.gov>
Date:   Wed Jul 29 12:39:30 2015 -0500

    Remove unused old code.
    
    When we added the new alltoall code, we commented out the old code,
    but kept it in case there were bugs in the new code.  It's been
    several years since we did that and haven't noticed any bugs.  So it's
    safe to delete the old code.  It's safely stored in the version
    control system anyway.
    
    Signed-off-by: Lena Oden <loden at anl.gov>

diff --git a/src/mpi/coll/alltoall.c b/src/mpi/coll/alltoall.c
index f3e3c35..5a465a5 100644
--- a/src/mpi/coll/alltoall.c
+++ b/src/mpi/coll/alltoall.c
@@ -150,11 +150,6 @@ int MPIR_Alltoall_intra(
     MPID_Request **reqarray;
     MPI_Status *starray;
     MPIU_CHKLMEM_DECL(6);
-#ifdef MPIR_OLD_SHORT_ALLTOALL_ALG
-    MPI_Aint sendtype_true_extent, sendbuf_extent, sendtype_true_lb;
-    int k, p, curr_cnt, dst_tree_root, my_tree_root;
-    int last_recv_cnt, mask, tmp_mask, tree_root, nprocs_completed;
-#endif
 
     if (recvcount == 0) return MPI_SUCCESS;
 
@@ -322,159 +317,6 @@ int MPIR_Alltoall_intra(
                                        recvcount, recvtype);
             if (mpi_errno) MPIU_ERR_POP(mpi_errno);
         }
-
-
-#ifdef MPIR_OLD_SHORT_ALLTOALL_ALG
-        /* Short message. Use recursive doubling. Each process sends all
-           its data at each step along with all data it received in
-           previous steps. */
-        
-        /* need to allocate temporary buffer of size
-           sendbuf_extent*comm_size */
-        
-        /* get true extent of sendtype */
-        MPIR_Type_get_true_extent_impl(sendtype, &sendtype_true_lb, &sendtype_true_extent);
-
-        sendbuf_extent = sendcount * comm_size *
-            (MPIR_MAX(sendtype_true_extent, sendtype_extent));
-        MPIU_CHKLMEM_MALLOC(tmp_buf, void *, sendbuf_extent*comm_size, mpi_errno, "tmp_buf");
-        
-        /* adjust for potential negative lower bound in datatype */
-        tmp_buf = (void *)((char*)tmp_buf - sendtype_true_lb);
-        
-        /* copy local sendbuf into tmp_buf at location indexed by rank */
-        curr_cnt = sendcount*comm_size;
-        mpi_errno = MPIR_Localcopy(sendbuf, curr_cnt, sendtype,
-                                   ((char *)tmp_buf + rank*sendbuf_extent),
-                                   curr_cnt, sendtype);
-	if (mpi_errno) { MPIU_ERR_POP(mpi_errno);}
-        
-        mask = 0x1;
-        i = 0;
-        while (mask < comm_size) {
-            dst = rank ^ mask;
-            
-            dst_tree_root = dst >> i;
-            dst_tree_root <<= i;
-            
-            my_tree_root = rank >> i;
-            my_tree_root <<= i;
-            
-            if (dst < comm_size) {
-                mpi_errno = MPIC_Sendrecv(((char *)tmp_buf +
-                                              my_tree_root*sendbuf_extent),
-                                             curr_cnt, sendtype,
-                                             dst, MPIR_ALLTOALL_TAG, 
-                                             ((char *)tmp_buf +
-                                              dst_tree_root*sendbuf_extent),
-                                             sendbuf_extent*(comm_size-dst_tree_root),
-                                             sendtype, dst, MPIR_ALLTOALL_TAG, 
-                                             comm_ptr, &status, errflag);
-                if (mpi_errno) {
-                    /* for communication errors, just record the error but continue */
-                    *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
-                    MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
-                    MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
-                    last_recv_cnt = 0;
-                } else
-                    /* in case of non-power-of-two nodes, less data may be
-                       received than specified */
-                    MPIR_Get_count_impl(&status, sendtype, &last_recv_cnt);
-                curr_cnt += last_recv_cnt;
-            }
-            
-            /* if some processes in this process's subtree in this step
-               did not have any destination process to communicate with
-               because of non-power-of-two, we need to send them the
-               result. We use a logarithmic recursive-halfing algorithm
-               for this. */
-            
-            if (dst_tree_root + mask > comm_size) {
-                nprocs_completed = comm_size - my_tree_root - mask;
-                /* nprocs_completed is the number of processes in this
-                   subtree that have all the data. Send data to others
-                   in a tree fashion. First find root of current tree
-                   that is being divided into two. k is the number of
-                   least-significant bits in this process's rank that
-                   must be zeroed out to find the rank of the root */ 
-                j = mask;
-                k = 0;
-                while (j) {
-                    j >>= 1;
-                    k++;
-                }
-                k--;
-                
-                tmp_mask = mask >> 1;
-                while (tmp_mask) {
-                    dst = rank ^ tmp_mask;
-                    
-                    tree_root = rank >> k;
-                    tree_root <<= k;
-                    
-                    /* send only if this proc has data and destination
-                       doesn't have data. at any step, multiple processes
-                       can send if they have the data */
-                    if ((dst > rank) && 
-                        (rank < tree_root + nprocs_completed)
-                        && (dst >= tree_root + nprocs_completed)) {
-                        /* send the data received in this step above */
-                        mpi_errno = MPIC_Send(((char *)tmp_buf +
-                                                  dst_tree_root*sendbuf_extent),
-                                                 last_recv_cnt, sendtype,
-                                                 dst, MPIR_ALLTOALL_TAG,
-                                                 comm_ptr, errflag);
-                        if (mpi_errno) {
-                            /* for communication errors, just record the error but continue */
-                            *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
-                            MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
-                            MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
-                        }
-                    }
-                    /* recv only if this proc. doesn't have data and sender
-                       has data */
-                    else if ((dst < rank) && 
-                             (dst < tree_root + nprocs_completed) &&
-                             (rank >= tree_root + nprocs_completed)) {
-                        mpi_errno = MPIC_Recv(((char *)tmp_buf +
-                                                  dst_tree_root*sendbuf_extent),
-                                                 sendbuf_extent*(comm_size-dst_tree_root),
-                                                 sendtype,   
-                                                 dst, MPIR_ALLTOALL_TAG,
-                                                 comm_ptr, &status, errflag);
-                        if (mpi_errno) {
-                            /* for communication errors, just record the error but continue */
-                            *errflag = MPIR_ERR_GET_CLASS(mpi_errno);
-                            MPIU_ERR_SET(mpi_errno, *errflag, "**fail");
-                            MPIU_ERR_ADD(mpi_errno_ret, mpi_errno);
-                            last_recv_cnt = 0;
-                        } else
-                            MPIR_Get_count_impl(&status, sendtype, &last_recv_cnt);
-                        curr_cnt += last_recv_cnt;
-                    }
-                    tmp_mask >>= 1;
-                    k--;
-                }
-            }
-            
-            mask <<= 1;
-            i++;
-        }
-        
-        /* now copy everyone's contribution from tmp_buf to recvbuf */
-        for (p=0; p<comm_size; p++) {
-            mpi_errno = MPIR_Localcopy(((char *)tmp_buf +
-                                        p*sendbuf_extent +
-                                        rank*sendcount*sendtype_extent),
-                                        sendcount, sendtype, 
-                                        ((char*)recvbuf +
-                                         p*recvcount*recvtype_extent), 
-                                        recvcount, recvtype);
-	    if (mpi_errno) { MPIU_ERR_POP(mpi_errno); }
-        }
-        
-#endif
-
     }
 
     else if (nbytes <= MPIR_CVAR_ALLTOALL_MEDIUM_MSG_SIZE) {

-----------------------------------------------------------------------

Summary of changes:
 src/mpi/coll/alltoall.c |  158 -----------------------------------------------
 1 files changed, 0 insertions(+), 158 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list