Jeff Squyres wrote on Thu, 8 Jul 2010 at 10:29:37
On Jul 8, 2010, at 12:26 PM, Fab Tillier wrote:
I agree - we shouldn't conflate counts and sizes, they are totally different things. Defining them both makes sense to me.
But they are the same for the MPI_PACKED datatype, so really shouldn't be different.
...and let's not forget that MPI_Aint's are used for displacements in MPI_GEt, MPI_PUT, and MPI_ACCUMULATE. :-\ Should we disentangle those, too?
No, because MPI_Aint is as close as the standard comes to size_t, which is the right type. I would anticipate MPI implementations defining MPI_Size/MPI_Count as either int for back compat, or MPI_Aint. Though I wouldn't be surprised if some platform has some weird MPI_Aint limitation, but in my cosy little world of Windows, MPI_Aint is really size_t.
As an aside, can count ever be larger than size_t?
I don't think so, but why do you ask?
Because if count could be larger than size_t, but MPI_Size cannot, you have a mismatch that we need to make sure we understand. In this context, MPI_Size is the type used for functions that should have used MPI_Aint but didn't for historical reasons such as MPI_Pack/Unpack/Type_size/Pack_size. -Fab