[Mpi-forum] MPI_Count

Darius Buntinas buntinas at mcs.anl.gov
Mon Jan 25 15:33:50 CST 2010


I liked Mark's suggestion.  Using MPI_Count rather than explicitly 
fixing the size means the user has to check for overflow.

Did the person state what the portability issues with int64_t could be? 
  Is there a C "basic type" that would be compatible with a fortran 
INTEGER*8?  BTW, we already added stdint datatypes to MPI 2.2.

-d

On 01/25/2010 03:04 PM, Jeff Squyres wrote:
> On Jan 24, 2010, at 9:21 PM, Snir, Marc wrote:
>
>> I would suggest to use explicitly 64 bit integers as the type of count in the new functions. I.e., int64_t in C and INTEGER(KIND=8) in Fortran. Both types are part of the (C/Fortran) standard.
>
> FWIW, I mentioned the above point on the MPI3 Fortran WG mailing list and got this reply:
>
>> Please do not touch any of the<stdint.h>  stuff with a
>> bargepole!  Stick to the basic types and MPI type names.
>>
>> There are many different ways where<stdint.h>  integers cause portability,
>> efficiency and other problems.  Inter alia, the current revision of C is
>> thinking of changing them in ways that could be incompatible with old code,
>> and they are semantically incompatible with Fortran and many other languages
>> in several respects.
>>
>> MPI_count gives the opportunity to evade any such chaos, whether introduced
>> by the standard or an implementation.
>



More information about the mpi-forum mailing list