[Mpi3-bwcompat] MPI_Count mixing with int...

Fab Tillier ftillier at [hidden]
Thu Jul 8 15:30:30 CDT 2010



Jeff Squyres wrote on Thu, 8 Jul 2010 at 10:34:46

> On Jul 8, 2010, at 1:32 PM, Quincey Koziol wrote:
> 
>>> As an aside, can count ever be larger than size_t?
>> 
>>         I would imagine so - on a 32-bit CPU/system with a 64-bit
> file system.
> 
> Oh ya, that whole filesystem thing.  :-)

But even on a 32-bit system, you can't do more than a 32-bit file access at a time.  Even if you created a datatype that represented more than 2^31 bytes, you wouldn't be able to use it in any of the functions because you wouldn't be able to transfer that much data at once.

> But still -- why do you ask?  I am hoping you don't plan to mention
> "size_t" in the standard at all...

I ask because MPI_Size (for MPI_Type_size, MPI_Pack_size, and the position parameters of MPI_Pack/Unpack) would likely be size_t - how could you use more than the addressable space?

I also think that MPI_Count would reasonably be size_t also, since I pretty firmly believe that MPI_Count and MPI_Size should be the same type.

-Fab



More information about the Mpi3-bwcompat mailing list