[Mpi-forum] MPI Count proposal from today's meeting
N.M. Maclaren
nmm1 at cam.ac.uk
Fri Jun 18 02:29:31 CDT 2010
On Jun 17 2010, N.M. Maclaren wrote:
>On Jun 17 2010, Supalov, Alexander wrote:
>>
>>Thanks. Why signed?
>
>...
>
> It is useful to be able to specify invalid or exceptional values as
>out-of-band ones, and that isn't possible for any positive integer. The
>standard states that MPI_UNDEFINED is negative in one place, and that
>can be returned from MPI_Get_count.
Sorry about following up to myself, but I though about it later, and
this is a mathematically solid proof that either MPI_Count must be
signed or the specification of MPI_Get_count (at least) needs changing.
MPI_UNDEFINED has to be a value that will fit in a 'short' integer, as
it is heavily used for undefined ranks. But ALL non-negative 'short'
integer values are also valid counts when using 'long' integers for
those, and it has to be something that can't be a valid count. Q.E.D.
Regards,
Nick Maclaren.
More information about the mpi-forum
mailing list