From 418b989781d948d84b9c38a86424dcbb2ba402ba Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Thu, 22 Jul 2010 01:53:01 +0000 Subject: [PATCH] Divide by size, not status->_count. Gives a much better answer. :-) This commit was SVN r23470. --- ompi/mpi/c/get_count.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ompi/mpi/c/get_count.c b/ompi/mpi/c/get_count.c index 5604562c08..1a63521a9c 100644 --- a/ompi/mpi/c/get_count.c +++ b/ompi/mpi/c/get_count.c @@ -69,7 +69,7 @@ int MPI_Get_count(MPI_Status *status, MPI_Datatype datatype, int *count) *count = 0; } else { internal_count = status->_ucount / size; /* count the number of complete datatypes */ - if( (internal_count * status->_ucount) != status->_ucount ) { + if( (internal_count * size) != status->_ucount ) { *count = MPI_UNDEFINED; } else if( internal_count > ((size_t)INT_MAX) ) { /* We have more elements that we can represent with a