This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFC: Coarray - implementation of the communication library


On 06/01/2011 11:25 AM, Richard Guenther wrote:
[Coarray implementation]
Wouldn't it be easier to do a first implementation completely with
blocking communication?  I will try to have a look at the non-blocking
stuff as I have some (bad ;)) experience when teaching that to POOMA...

Well, at some point there has to be one-sided communication as that's the semantics of coarrays. Thus, either the called library does single-sided communication (e.g. via MPIv2, GASNet, ARMCI/Global arrays) - or one does it oneself using a combination of buffered and nonblocking communication. There might be some special cases where one can temporarily switch to blocking communication, but generally, it won't work.


Example:

if (this_image() == 3) then
  data[1] = data[2]
end if
sync all

Here, image 3 needs to tell image 2 to send data (to image 1 directly or to image 3) - and tell image 1 to receive data (from image 3 or directly from image 1). Thus, either one uses directly one-sided communication, or one sends (nonblocking) token around, telling each image what it should do. (The images need to wait anyhow for the "sync all" token from the other images.)
(For one reason against one-sided MPI v2, cf. [1], item 1.)


Tobias

[1] http://gcc.gnu.org/ml/fortran/2010-03/msg00201.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]