From 353e8a7a9ccd766481784c752c0e2fbd96072840 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Fri, 15 Oct 2004 12:14:09 +0000 Subject: [PATCH] Correct a misleading typo in the explanation comment, and clarify another comment. This commit was SVN r3159. --- src/mca/coll/basic/coll_basic_reduce.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mca/coll/basic/coll_basic_reduce.c b/src/mca/coll/basic/coll_basic_reduce.c index 40a9b75837..58fa76b272 100644 --- a/src/mca/coll/basic/coll_basic_reduce.c +++ b/src/mca/coll/basic/coll_basic_reduce.c @@ -151,7 +151,7 @@ int mca_coll_basic_reduce_lin_intra(void *sbuf, void *rbuf, int count, 2. If B is what we get back from malloc, but we give A to MPI_Send, then the buffer range [A,B) represents "dead space" - -- no data will be put there. So it's safe to give A-LB to + -- no data will be put there. So it's safe to give B-LB to MPI_Send. More specifically, the LB is positive, so B-LB is actually A. @@ -166,9 +166,9 @@ int mca_coll_basic_reduce_lin_intra(void *sbuf, void *rbuf, int count, Hence, in all cases, we give (return_from_malloc - LB) to MPI_Send. This works fine and dandy if we only have (count==1), which we - rarely do. ;-) So we need to then allocate ((count-1)*extent) to - get enough space for the rest. This may be more than is - necessary, but it's ok. + rarely do. ;-) So we really need to allocate (true_extent + + ((count - 1) * extent)) to get enough space for the rest. This may + be more than is necessary, but it's ok. Simple, no? :-)