From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Tue May 14 21:15:17 2013
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id C8C45356E85; Tue, 14 May 2013 21:15:17 +0200 (CEST)
Delivered-To: sc22wg5@open-std.org
X-Greylist: delayed 1031 seconds by postgrey-1.34 at www5.open-std.org; Tue, 14 May 2013 21:15:16 CEST
Received: from ppsw-33.csi.cam.ac.uk (ppsw-33.csi.cam.ac.uk [131.111.8.133])
	by www.open-std.org (Postfix) with ESMTP id F128B356929
	for <sc22wg5@open-std.org>; Tue, 14 May 2013 21:15:01 +0200 (CEST)
X-Cam-AntiVirus: no malware found
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:43453)
	by ppsw-33.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:25)
	with esmtpa (EXTERNAL:nmm1) id 1UcKPz-00063x-gi (Exim 4.80_167-5a66dd3)
	(return-path <nmm1@hermes.cam.ac.uk>); Tue, 14 May 2013 19:57:47 +0100
Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1UcKPz-0007L9-5z (Exim 4.72)
	(return-path <nmm1@hermes.cam.ac.uk>); Tue, 14 May 2013 19:57:47 +0100
Received: from [91.125.161.29] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.5); 14 May 2013 19:57:47 +0100
Date: 14 May 2013 19:57:47 +0100
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: sc22wg5@open-std.org, Mark Batty <mbatty@cantab.net>
Cc: Bill Long <longb@cray.com>, "Lionel, Steve" <steve.lionel@intel.com>,
    Lorri Menard <lorri.menard@intel.com>, Daniel C Chen <cdchen@ca.ibm.com>
Subject: Existing support for uses of atomics in Fortran coarray codes
Message-ID: <Prayer.1.3.5.1305141957470.21184@hermes-2.csi.cam.ac.uk>
X-Mailer: Prayer v1.3.5
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Mark Batty, Peter Sewell and I had a discussion about atomic semantics and
Fortran this morning, but there were a couple of things that were rather
important and I didn't have a feel for the answers.  Specifically, what
semantics are provided by existing coarray atomics, and how they are used
in real programs.  We are definitely going to have to decide what to say
about this at Delft, and the problem isn't simple :-(

In particular:

    Do implementations guarantee coherence of access to a single atomic
location and, if not, what do they guarantee?

    What, if anything, do they guarantee about the consistency of accesses
to two different atomic locations?

We know what POWER and x86 hardware guarantee, but have no idea of what
(more? less?) is guaranteed in coarray implementations.  Even with using
MPI as a basis, it could be anything from sequential consistency to
nothing, depending on the details of the implementation.  And the fancy
RDMA networks are another matter entirely!

It would also be useful if there were some examples of how they are used
for ordering (i.e. in combination with SYNC MEMORY) and running totals
etc.  Specifically, any use where the consistency semantics matter to the
program.

Any feedback appreciated.  Thanks.


Regards,
Nick Maclaren.



