1
1

Divide by size, not status->_count. Gives a much better answer. :-)

This commit was SVN r23470.
Этот коммит содержится в:
Jeff Squyres 2010-07-22 01:53:01 +00:00
родитель 62fe827bdf
Коммит 418b989781

Просмотреть файл

@ -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