[mpiwg-rma] MPI_Win_create on unmapped memory?

Thomas Jahns jahns at dkrz.de
Wed Jan 3 03:07:31 CST 2018


On 01/02/18 20:52, Jeff Hammond wrote:
> If a user passes a (base,size) pair that corresponds to a range of addresses 
> that are not allocated and/or mapped, is that a correct MPI program?

Such a thing wouldn't be a valid object pointer in C/C++ or a variable in 
Fortran, i.e. both languages prohibit this.

> The only text I can find that implies that buffers passed to MPI_Win_create have 
> to be allocated is the following, assuming that one interprets "existing memory" 
> this way.
> 
> "Each process specifies a window of existing memory that it exposes to RMA 
> accesses by the processes in the group of comm." (MPI 3.1 11.2.1)

Since MPI is a library standard I would still expect all the guarantees of the 
language standards involved to hold and the above to only be an additional 
clarification?

> The Fortran-specific text is similarly suggestive, but it only says that a user 
> can pass a simply contiguous array, not that such a thing is required.
> 
> "In Fortran, one can pass the first element of a memory region or a whole array, 
> which must be ‘simply contiguous’"

That's most probably because of the Fortran storage association "feature" which 
is more about how arrays were passed in pre-Fortran 90 times, i.e. it's legal 
for a caller C to pass some array element A(i) to a subprogram P accepting an 
array argument B(*) provided the effective size (that is the indices of B used 
in P match to valid indices of A).

Regards, Thomas
-- 
Thomas Jahns
HD(CP)^2
Abteilung Anwendungssoftware

Deutsches Klimarechenzentrum GmbH
Bundesstraße 45a • D-20146 Hamburg • Germany

Phone:  +49 40 460094-151
Fax:    +49 40 460094-270
Email:  Thomas Jahns <jahns at dkrz.de>
URL:    www.dkrz.de

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4729 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.mpi-forum.org/pipermail/mpiwg-rma/attachments/20180103/4703c845/attachment-0001.p7s>


More information about the mpiwg-rma mailing list