[MPI3 Fortran] Straw vote on integers kinds

N.M. Maclaren nmm1 at cam.ac.uk
Tue Sep 15 11:21:20 CDT 2009


On Sep 15 2009, Jeff Squyres wrote:
>On Sep 15, 2009, at 11:40 AM, Craig Rasmussen wrote:
>
>> As Jeff had replied, there will be at least two integers.  One for
>> integers that scale with memory size and others (like MPI tags) that
>> don't.

Good.  I think that's (almost) all that is needed - there's no point in
going overboard.

>Don't forget, too, that MPI_ADDRESS_KIND already exists (meant to be  
>an integer type that is large enough to hold an address), as does  
>MPI_OFFSET_KIND (for file offsets).

Right.  But MPI_ADDRESS_KIND is a hairy sort of integer, that may or may
not be large enough to hold an address, and is quite likely to be horribly
inefficient if it does.  Unlike in C, Fortran has no requirement for the
size of an object to be within the size of ANY integer - all its normal
addressing is in terms of indices.  It was very common and reasonable for
64-bit systems to have nothing more than 32-bit integers; that is fairly
rarely true nowadays, but the point stands.

Also, though it's not really related, and is clearly a trivially fixable
oversight, MPI_ADDRESS_KIND is a pain, because it doesn't have an associated
MPI type and so is not easy to transfer between processes.  Teaching
attributes is not simplified by that gotcha :-(


Regards,
Nick Maclaren.







More information about the mpiwg-fortran mailing list