[Mpiwg-large-counts] Large Count - the principles for counts, sizes, and byte and nonbyte displacements

Rolf Rabenseifner rabenseifner at hlrs.de
Wed Oct 23 09:44:54 CDT 2019


Dear Jeff,

>    typedef struct { uint64_t context; uint64_t pointer; } MPI_Aint;
>
> Is that incorrect?

I expect, that it is not correct. My apologies for that.

In MPI-1.0 - MPI-2.1 all address calculation had to be done with - and + operators.
Only for the case, that somebody switches integer overflow detection on,
we added MPI_Aint_add and MPI_Aint_diff.

We asked ourself, whether we want to deprecate the use of + and - operators,
i.e., to add this to Table 2.1 on page 18 and the forum decided "no" per straw vote.
We definitely never removed the operators + and - from the list of 
valid operations for MPI_Aint.

MPI-3.1 on page 17 lines 16-18 clearly tells that any int, MPI:Aint, and MPI_Offset value
can be assigned to a MPI_Count variable, i.e., all 4 must be integers of some byte-size.

Best regards
Rolf 
 

----- Original Message -----
> From: "Jeff Squyres" <jsquyres at cisco.com>
> To: "Rolf Rabenseifner" <rabenseifner at hlrs.de>, "mpiwg-large-counts" <mpiwg-large-counts at lists.mpi-forum.org>
> Sent: Wednesday, October 23, 2019 4:19:53 PM
> Subject: Re: [Mpiwg-large-counts] Large Count - the principles for counts, sizes, and byte and nonbyte displacements

> On Oct 9, 2019, at 1:44 PM, Rolf Rabenseifner via mpiwg-large-counts
> <mpiwg-large-counts at lists.mpi-forum.org> wrote:
> 
>> I never said that that a number is a displacement.
>> MPI_Aint is clearly used for
>> - addresses relative to a buffer begin,
>> - absolute addresses (returned by MPI_GET_ADDRESS)
>> - number of bytes.
>> 
>> MPI-3.1 says
>> 2.5.6 Absolute Addresses and Relative Address Displacements
>> Some MPI procedures use address arguments that represent an absolute address in
>> the calling
>> program, or relative displacement arguments that represent differences of two
>> absolute
>> addresses. The datatype of such arguments is MPI_Aint in C and INTEGER (KIND=
>> MPI_ADDRESS_KIND) in Fortran.
> 
> I thought the whole point of MPI_Aint was to support segmented address spaces.
> Indeed, the next sentence in MPI-3.1 states:
> 
> "These types must have the same width and encode address values in the same
> manner such that address values in one language may be passed directly to
> another language without conversion."
> 
> This says to me that MPI_Aint can be encoded, which I take to mean the
> following:
> 
> 1. This is exactly the reason why we have MPI_AINT_ADD / MPI_AINT_DIFF.
> 2. Presuming I have an MPI_ADDRESS_KIND value in Fortran that represents a 128
> bit integer, the following is valid in C:
> 
>    typedef struct { uint64_t context; uint64_t pointer; } MPI_Aint;
> 
> Is that incorrect?
> 
> --
> Jeff Squyres
> jsquyres at cisco.com

-- 
Dr. Rolf Rabenseifner . . . . . . . . . .. email rabenseifner at hlrs.de .
High Performance Computing Center (HLRS) . phone ++49(0)711/685-65530 .
University of Stuttgart . . . . . . . . .. fax ++49(0)711 / 685-65832 .
Head of Dpmt Parallel Computing . . . www.hlrs.de/people/rabenseifner .
Nobelstr. 19, D-70550 Stuttgart, Germany . . . . (Office: Room 1.307) .


More information about the mpiwg-large-counts mailing list