[MPI3 Fortran] Argument data sizes
Bill Long
longb at cray.com
Thu Sep 18 10:39:06 CDT 2008
Jeff Squyres wrote:
> On Sep 18, 2008, at 11:15 AM, Bill Long wrote:
>
>>> Yes, I understand that, but if MPI itself doesn't accept counts (and
>>> other parameter values) larger than what can be represented by a C
>>> int, what does allowing an INTEGER*8 in the MPI Fortran interface mean?
>>
>> But essentially all modern processors use 64-bit addressing. If a C
>> int is 32 bits, then this restriction is a basic design flaw in MPI
>> that needs to be fixed. Either that or a C int needs to be 64 bits.
>> (The earlier discussion about default64 switches originated with
>> legacy supercomputers where, indeed, the default integer in Fortran
>> AND C int were 64 bits, so there was no internal inconsistency.)
>> Getting MPI to force a change on the C standard is probably out of
>> scope. However, fixing the MPI spec to mandate that count arguments
>> be of type int64_t, or perhaps better, intptr_t, is quite reasonable,
>> and recognizes modern reality.
>
> I think you're talking about something different.
>
> I said that MPI's *count* arguments are C int's. I never said that
> MPI's *address* specifications were C int's (indeed, in C, they're not
> -- they're of type MPI_Aint, which is a type that is large enough to
> hold an address-sized integer).
>
> The *count* (and other similar parameters) is how many [typed] items
> you want to send / receive / etc. Right now, MPI defines counts as
> int's in C.
Actually, this is what I'm talking about. In particular, the size of a
single array, which in a modern machine can easily be larger that 4
billion elements. The limits on array sizes and buffer sizes are
directly tied to the hardware addressing limitations of the system. The
idea that counts should be limited to 32 bits is an archaic remnant from
the era when machine addresses were 32 bits.
Cheers,
Bill
>
>> Besides, I thought one of the earlier postings claimed that the MPI
>> spec was language independent. In that case, discussion of C int is
>> out of order. A language independent spec would refer to an integer
>> type capable of representing any system address.
>
> Per above, I think you missed that specific point.
>
> But as to why I'm harping on C int's and not "generic integer" (for
> *counts*, not *addresses*), I also mentioned in an earlier post that
> the reality is that most [all?] MPI implementations are written in C.
> So the vast majority of other language bindings need to be able to map
> to the C bindings nicely.
>
> Failure to design with this goal in mind may result in push back from
> the MPI implementors because it may require major changes in MPI
> implementations (change internal data structures, change wire
> protocols, hurt backwards compatibility, etc.). I'm not saying that
> mandating 8 byte integer counts (and others) is a showstopper -- I'm
> saying that it will require a broader discussion with the rest of the
> Forum. I also previously mentioned that this is an ongoing topic in
> the Forum and is not likely to get resolved soon.
>
--
Bill Long longb at cray.com
Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120
More information about the mpiwg-fortran
mailing list