From owner-sc22wg5@open-std.org  Wed Dec  3 07:27:36 2008
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom7
Delivered-To: sc22wg5-dom7@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id D7CE4CA3428; Wed,  3 Dec 2008 07:27:36 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from smtp.llnl.gov (nspiron-3.llnl.gov [128.115.41.83])
	by www2.open-std.org (Postfix) with ESMTP id 0D6D0C178E6
	for <sc22wg5@open-std.org>; Wed,  3 Dec 2008 07:27:35 +0100 (CET)
X-Attachments: None
Received: from vpna-user-128-15-244-19.llnl.gov (HELO [128.15.244.19]) ([128.15.244.19])
  by smtp.llnl.gov with ESMTP; 02 Dec 2008 22:27:34 -0800
Message-ID: <493626D6.9020006@llnl.gov>
Date: Tue, 02 Dec 2008 22:27:34 -0800
From: Aleksandar Donev <donev1@llnl.gov>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.8) Gecko/20071009 SeaMonkey/1.1.5
MIME-Version: 1.0
To: Van.Snyder@jpl.nasa.gov, WG5 <sc22wg5@open-std.org>
Subject: Re: (j3.2006) (SC22WG5.3701) Atomic stuff
References: <20081203025222.12F4BC178E0@www2.open-std.org>
In-Reply-To: <20081203025222.12F4BC178E0@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Hi Van,

> 1.  Provide an attribute for a variable that says accesses to it are
> atomic.
While this may be preferable to the use of intrinsics, it is also much 
more complex to get right, especially in terms of matching of the 
attribute across association (can you point a nonatomic pointer to an 
atomic, how about arrays, etc.).

The other two ideas, while possibly technically useful, have nothing to 
do with ATOMIC. Until Fortran proper has accessors/updaters their use 
for atomic operations is out of the question.

I prefer alternative mechanisms to specify atomic operations (notably an 
ATOMIC block), but, that was not the goal. The goal was to provide some 
simple mechanism for spin loops and the like without the problems of 
VOLATILE. It is a compromise, and nobody's first preference. Nothing 
wrong with that, IMO, especially since it is just two intrinsics and not 
something that fundamentally messes up the language for eternity.

Best,
Aleks

-- 
Aleksandar Donev, Ph.D.
Lawrence Postdoctoral Fellow @ LLNL
High Performance Computational Materials Science and Chemistry
E-mail: donev1@llnl.gov
Phone: (925) 424-6816  Fax: (925) 423-0785
Address: P.O.Box 808, L-367, Livermore, CA 94551-9900
Web: http://cherrypit.princeton.edu/donev
