[mpich-commits] [mpich] MPICH primary repository branch, master, updated. v3.1.1-61-g3ac0b20

Service Account noreply at mpich.org
Mon Jul 7 13:37:21 CDT 2014


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  3ac0b20ed99578c7997df48f210fce9fbc1ea891 (commit)
      from  b61fc70291f34acf1995ca3988207af5038f927b (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/3ac0b20ed99578c7997df48f210fce9fbc1ea891

commit 3ac0b20ed99578c7997df48f210fce9fbc1ea891
Author: Wesley Bland <wbland at anl.gov>
Date:   Sun Jul 6 12:17:39 2014 -0500

    Fix collective alias checks to look for zero-sized buffers
    
    If the size of the input buffers is 0, don't bother to check if they are
    aliased.
    
    Fixes #2124
    
    Signed-off-by: Antonio J. Pena <apenya at mcs.anl.gov>

diff --git a/src/mpi/coll/exscan.c b/src/mpi/coll/exscan.c
index 3df9fe1..6d143e4 100644
--- a/src/mpi/coll/exscan.c
+++ b/src/mpi/coll/exscan.c
@@ -371,7 +371,7 @@ int MPI_Exscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datat
             }
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (sendbuf != MPI_IN_PLACE)
+            if (sendbuf != MPI_IN_PLACE && count != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;
diff --git a/src/mpi/coll/iexscan.c b/src/mpi/coll/iexscan.c
index 97ef8cb..6f9eab0 100644
--- a/src/mpi/coll/iexscan.c
+++ b/src/mpi/coll/iexscan.c
@@ -306,7 +306,7 @@ int MPI_Iexscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype data
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (sendbuf != MPI_IN_PLACE)
+            if (sendbuf != MPI_IN_PLACE && count != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/ired_scat.c b/src/mpi/coll/ired_scat.c
index c9d86b7..d805195 100644
--- a/src/mpi/coll/ired_scat.c
+++ b/src/mpi/coll/ired_scat.c
@@ -1082,6 +1082,7 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
     int mpi_errno = MPI_SUCCESS;
     MPID_Comm *comm_ptr = NULL;
     MPID_MPI_STATE_DECL(MPID_STATE_MPI_IREDUCE_SCATTER);
+    int i = 0;
 
     MPIU_THREAD_CS_ENTER(ALLFUNC,);
     MPID_MPI_FUNC_ENTER(MPID_STATE_MPI_IREDUCE_SCATTER);
@@ -1134,7 +1135,9 @@ int MPI_Ireduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPID_INTRACOMM && sendbuf != MPI_IN_PLACE)
+            while (i < comm_ptr->remote_size && recvcounts[i] == 0) ++i;
+
+            if (comm_ptr->comm_kind == MPID_INTRACOMM && sendbuf != MPI_IN_PLACE && i < comm_ptr->remote_size)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/ired_scat_block.c b/src/mpi/coll/ired_scat_block.c
index 6ca9c55..e75fc36 100644
--- a/src/mpi/coll/ired_scat_block.c
+++ b/src/mpi/coll/ired_scat_block.c
@@ -1035,7 +1035,7 @@ int MPI_Ireduce_scatter_block(const void *sendbuf, void *recvbuf,
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (comm_ptr->comm_kind == MPID_INTRACOMM && sendbuf != MPI_IN_PLACE)
+            if (comm_ptr->comm_kind == MPID_INTRACOMM && sendbuf != MPI_IN_PLACE && recvcount != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/iscan.c b/src/mpi/coll/iscan.c
index e0338fd..2c8f82c 100644
--- a/src/mpi/coll/iscan.c
+++ b/src/mpi/coll/iscan.c
@@ -442,7 +442,7 @@ int MPI_Iscan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype dataty
 
             MPIR_ERRTEST_ARGNULL(request,"request", mpi_errno);
 
-            if (sendbuf != MPI_IN_PLACE)
+            if (sendbuf != MPI_IN_PLACE && count != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
             /* TODO more checks may be appropriate (counts, in_place, etc) */
         }
diff --git a/src/mpi/coll/red_scat.c b/src/mpi/coll/red_scat.c
index 2221b04..ba58240 100644
--- a/src/mpi/coll/red_scat.c
+++ b/src/mpi/coll/red_scat.c
@@ -1174,7 +1174,7 @@ int MPI_Reduce_scatter(const void *sendbuf, void *recvbuf, const int recvcounts[
             MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf, recvcounts[comm_ptr->rank], mpi_errno);
             if (comm_ptr->comm_kind == MPID_INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, sum, mpi_errno);
-            } else if (sendbuf != MPI_IN_PLACE)
+            } else if (sendbuf != MPI_IN_PLACE && sum != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
 
             MPIR_ERRTEST_USERBUFFER(recvbuf,recvcounts[comm_ptr->rank],datatype,mpi_errno);
diff --git a/src/mpi/coll/red_scat_block.c b/src/mpi/coll/red_scat_block.c
index b5cf449..b3a8757 100644
--- a/src/mpi/coll/red_scat_block.c
+++ b/src/mpi/coll/red_scat_block.c
@@ -1138,7 +1138,7 @@ int MPI_Reduce_scatter_block(const void *sendbuf, void *recvbuf,
             MPIR_ERRTEST_RECVBUF_INPLACE(recvbuf, recvcount, mpi_errno);
             if (comm_ptr->comm_kind == MPID_INTERCOMM) {
                 MPIR_ERRTEST_SENDBUF_INPLACE(sendbuf, recvcount, mpi_errno);
-            } else if (sendbuf != MPI_IN_PLACE)
+            } else if (sendbuf != MPI_IN_PLACE && recvcount != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno)
 
             MPIR_ERRTEST_USERBUFFER(recvbuf,recvcount,datatype,mpi_errno);
diff --git a/src/mpi/coll/scan.c b/src/mpi/coll/scan.c
index ee826f6..da6cda3 100644
--- a/src/mpi/coll/scan.c
+++ b/src/mpi/coll/scan.c
@@ -549,7 +549,7 @@ int MPI_Scan(const void *sendbuf, void *recvbuf, int count, MPI_Datatype datatyp
             }
             if (mpi_errno != MPI_SUCCESS) goto fn_fail;
 
-            if (sendbuf != MPI_IN_PLACE)
+            if (sendbuf != MPI_IN_PLACE && count != 0)
                 MPIR_ERRTEST_ALIAS_COLL(sendbuf, recvbuf, mpi_errno);
         }
         MPID_END_ERROR_CHECKS;

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

Summary of changes:
 src/mpi/coll/exscan.c          |    2 +-
 src/mpi/coll/iexscan.c         |    2 +-
 src/mpi/coll/ired_scat.c       |    5 ++++-
 src/mpi/coll/ired_scat_block.c |    2 +-
 src/mpi/coll/iscan.c           |    2 +-
 src/mpi/coll/red_scat.c        |    2 +-
 src/mpi/coll/red_scat_block.c  |    2 +-
 src/mpi/coll/scan.c            |    2 +-
 8 files changed, 11 insertions(+), 8 deletions(-)


hooks/post-receive
-- 
MPICH primary repository


More information about the commits mailing list