[MPI3 Fortran] Straw vote on integers kinds

N.M. Maclaren nmm1 at cam.ac.uk
Mon Sep 14 14:25:40 CDT 2009


On Sep 14 2009, Bill Long wrote:
>Craig Rasmussen wrote:
>> 
>> Please vote for one of the options.  ...
>
>I'm not convinced there is much real difference among these options.

I agree, though for slightly different reasons.

I think that all four are a mistake, because they are conflating all MPI
integers into one.  I would use two names, one for integers that may scale
with memory size and one where that would be overkill.

But that being said:

>>    1. Use the default integer kind. ...
>
>This is what we have today. ...

Yes.  In the absence of positive reasons to change, I vote for this.  But
see below.

>>    2. Specify a named kind, e.g., MPI_INT_KIND. ...
>
>Option 1 is recovered with the definition MPI_INT_KIND = KIND(0).

I would vote for this, too.  I.e. specify a KIND, but specify it to be
KIND(0).  Programmers who care about serious portability over time and
space would use the name.

Fortran KINDs don't necessarily help with checking, as there is no way
to diagnose passing a default integer if MPI_INT_KIND happens to be KIND(0).

>>    4. Specify a named kind in the Fortran interface (MPI_INT_KIND) but
>>       allow the vendor a choice as to how to address integer promotion
>>       if users use default integers in their codes. ...
>
>Again, I'm not really seeing the practical difference here.

Why should it be promotion, anyway?  What if the default integer KIND is
64-bit and MPI_INT_KIND is 32-bit?

>I see that the wiki page proposes MPI_DOUBLE_KIND.  Is this intended to 
>be the same as C_DOUBLE?  Why is there no corresponding MPI_FLOAT_KIND? 
>Both might be affected (in much the same way) by a switch like -r8.

Yes, indeed.  And neither might match C double.

>Of course, the ideal situation would be to outlaw completely the use of 
>the -i8 and -r8  (and even worse, one and not the other) options. 
>Perhaps this could be an MPI requirement - no program that uses MPI is 
>allowed to use these switches.  That would be an enormous step in the 
>right direction.

Yes and no. I have no problem with the clean AUTODOUBLE options, especially 
for older code. That brings back the two modes, but is fully compatible 
with Fortran (and, yes, that doubles DOUBLE PRECISION). I agree that 
horrible mixtures of -i and -r should be consigned to the dustbin of 
history.

Regards,
Nick Maclaren.





More information about the mpiwg-fortran mailing list