AMPI: checkBuf should never see MPI_IN_PLACE - all routines should handle that first
authorPhil Miller <mille121@illinois.edu>
Thu, 15 Mar 2012 02:41:04 +0000 (21:41 -0500)
committerPhil Miller <mille121@illinois.edu>
Thu, 15 Mar 2012 03:04:27 +0000 (22:04 -0500)
src/libs/ck-libs/ampi/ampi.C

index 62ead3e8165335fc5ed3644ef9eadfcc280f62cc..105e8070acd3ed31fcf007418564edd6bcb873d6 100644 (file)
@@ -61,7 +61,7 @@ inline int checkRank(int rank, MPI_Comm comm) {
 }
 
   inline int checkBuf(void *buf, int count) {
-    if((count != 0 && buf == NULL))
+    if((count != 0 && buf == NULL) || buf == MPI_IN_PLACE)
       return MPI_ERR_BUFFER;
     return MPI_SUCCESS;
   }