[MPI3 Fortran] Argument data sizes

Supalov, Alexander alexander.supalov at intel.com
Thu Sep 18 16:37:55 CDT 2008


Hi,

I'm afraid that the proposed straw vote mixes up two things:

1) The need to handle 64-bit integers (say, if the user says -i8)
2) The need to handle 64-bit count arguments (which may be necessary
even if other ints are 32-bit)

For purpose 1), it looks like option 4) - default integers - are the
best way, as Aleks said, whatever happens under the hood.

For purpose 2), I'm voting for option 1). Note however that this is
actually a part of another discussion that we should wait the Forum
decision upon, and offer our opinion on the most appropriate Fortran
interface.

Best regards.

Alexander 

-----Original Message-----
From: mpi3-fortran-bounces at lists.mpi-forum.org
[mailto:mpi3-fortran-bounces at lists.mpi-forum.org] On Behalf Of Craig
Rasmussen
Sent: Thursday, September 18, 2008 10:42 PM
To: longb at cray.com; MPI-3 Fortran working group
Subject: Re: [MPI3 Fortran] Argument data sizes


On Sep 18, 2008, at 9:15 AM, Bill Long wrote:

>
>
> Jeff Squyres wrote:
>> On Sep 18, 2008, at 9:36 AM, Iain Bason wrote:
>>
>>>> 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.
>>
>> 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.
>

Jeff and I had a talk about several of the issues on the table and  
I've agreed to summarize.  I'll do this by responding to the various  
threads directly.

Bill raises an excellent point regarding the size of something that  
essentially reflects the amount of memory on a machine.  However, this  
is not in the scope of this group.  So any discussion regarding this  
should be taken up with the wider forum who is considering this topic.

However, it is within our purview to discuss how to best represent  
this size in Fortran.  I'm going to take a straw poll on this matter.   
Please choose one of the following choices:

1. A constant kind value defined by the implementation, e.g.,  
MPI_SIZE_KIND,
          integer(MPI_SIZE_KIND) :: count
     It is expected that MPI_SIZE_KIND be the same kind as a default  
integer

2. Similar to 1. expect the kind value is C_INT

3. Use overloading to select use either (effectively) a C int or a C  
long.  I don't think this will work with default integer dummies

4. Use default integer, write the wrapper in Fortran, and use  
assignment to cast the integer to C_INT.


I vote #1 as it provides the most flexibility to the implementer and  
the compiler will give an error if the programmer does something stupid.

Cheers,
Craig

_______________________________________________
mpi3-fortran mailing list
mpi3-fortran at lists.mpi-forum.org
http://lists.mpi-forum.org/mailman/listinfo.cgi/mpi3-fortran
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.





More information about the mpiwg-fortran mailing list