[MPI3 Fortran] Argument data sizes (was: Teleconference Wednesday, Sept. 17: Summary)

Iain Bason Iain.Bason at Sun.COM
Thu Sep 18 08:36:02 CDT 2008


On Sep 18, 2008, at 8:51 AM, Jeff Squyres wrote:

> I can see the argument of "use a compile flag to change all your  
> INTEGERs to INTEGER*8", but per Bill's argument, doesn't that imply  
> that users will expect that they can pass an MPI_SEND count value  
> that is too large to be held in an INTEGER?  Since the back-end MPI  
> doesn't support it (since MPI mandates that counts are C int's), it  
> won't work.

I don't want to put words in anyone's mouth, but I think that the  
problem is that:

1. There are a lot of Fortran programs written with declarations like
    "integer i", which means that "i" is a "default" integer.  The  
number
    of bytes occupied by a default integer may vary from one compiler
    to another.

2. Fortran is very picky about the sizes of integers passed as actual
    arguments.  The size that is passed must match the size that is
    expected.

3. Some programs assume that a default integer is a particular size.
    For example, they may pass a default integer value to a procedure
    that expects an explicit 8 byte integer.  Some compilers therefore
    have a command line flag to change the size of a default integer.

4. An integer constant (e.g., "124") is compiled to a default integer.
    One can write an integer constant of a specific kind, but nobody
    likes the extra keystrokes involved.

5. Sometimes you want to use an integer constant for an MPI_SEND count
    value.  (Presumably for other arguments as well.)

So it isn't that we need the count to be able to convey a huge number,  
it's that the absence of an interface that accepts an 8 byte count  
makes it more difficult to write portable programs.

Iain




More information about the mpiwg-fortran mailing list