From owner-sc22wg5@open-std.org  Thu Jan 22 18:08:20 2009
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 54863CA5FE6; Thu, 22 Jan 2009 18:08:20 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from mail1.cray.com (mail1.cray.com [136.162.0.111])
	by www2.open-std.org (Postfix) with ESMTP id 64D47CA3439
	for <sc22wg5@open-std.org>; Thu, 22 Jan 2009 18:08:17 +0100 (CET)
Received: from beaver.us.cray.com (beaver.us.cray.com [172.30.74.51])
	by mail1.cray.com (8.13.6/8.13.3/gw-5323) with ESMTP id n0MH83TM004316
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
	Thu, 22 Jan 2009 11:08:05 -0600 (CST)
Received: from CFEXFE01.us.cray.com (cfexfe01.us.cray.com [172.30.74.93])
	by beaver.us.cray.com (8.13.8/8.13.3/hub-5273) with ESMTP id n0MH82so019635;
	Thu, 22 Jan 2009 11:08:02 -0600
Received: from mh-dhcp-172-31-16-180.us.cray.com ([172.31.16.180]) by CFEXFE01.us.cray.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959);
	 Thu, 22 Jan 2009 11:08:01 -0600
Message-ID: <4978A8A0.8090407@cray.com>
Date: Thu, 22 Jan 2009 11:10:56 -0600
From: Bill Long <longb@cray.com>
Reply-To: longb@cray.com
Organization: Cray Inc.
User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
MIME-Version: 1.0
To: fortran standards email list for J3 <j3@j3-fortran.org>
Cc: Van.Snyder@jpl.nasa.gov, WG5 <sc22wg5@open-std.org>,
	MPI-3 Fortran working group <mpi3-fortran@lists.mpi-forum.org>
Subject: Re: (j3.2006) (SC22WG5.3886) [ukfortran]	[MPI3	Fortran]	MPI	non-blocking
 transfers
References: <Prayer.1.3.1.0901211104060.5654@hermes-2.csi.cam.ac.uk>	<49776DF7.1040900@cray.com>	<20090121211748.130A5C178D9@www2.open-std.org>	<20090121224014.6CB63C178D9@www2.open-std.org>	<20090121234200.4F3BDCA3434@www2.open-std.org>	<20090122000407.D5A8ECA3434@www2.open-std.org> <20090122100652.C31E9CA3434@www2.open-std.org>
In-Reply-To: <20090122100652.C31E9CA3434@www2.open-std.org>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-OriginalArrivalTime: 22 Jan 2009 17:08:01.0986 (UTC) FILETIME=[FBA82220:01C97CB3]
X-Cray-VirusStatus: clean
Sender: owner-sc22wg5@open-std.org
Precedence: bulk



N.M. Maclaren wrote:
> On Jan 22 2009, Van Snyder wrote:
>   
>> Assuming the problem is caused by the buffer not appearing as an actual
>> argument, it's not a defect in Fortran but rather in the design of MPI.
>>     
>
> If that were the whole problem, it would be.  It would also be a defect in
> the design for the Fortran WAIT statement.
>
>   

Except that the WAIT statement does have at least some semantics that 
the compiler understands. Which raises an interesting point.  Nick has 
pointed out several places where it is theoretically possible for the 
compiler optimizer to cause problems because the "invisible hand" of the 
MPI runtime  currently "owns" part of the program's memory space and 
either expects it to remain static (sends) or modifies it (receives).   
Fortran already has an attribute designed exactly for this situation - 
VOLATILE.   VOLATILE and ASYNCHRONOUS normally appear together in the 
standard since they are so similar in effect.  The one difference (from 
the compiler's point of view) is that the volatility of a variable with 
the asynchronous attribute can be "turned off" when the compiler sees a 
global WAIT.    If we modify the ASYNCHRONOUS attribute to be used to 
solve the issues with MPI calls, then WAIT is no longer special, and 
VOLATILE and ASYNCHRONOUS become functionally identical.  That's one of 
the undesirable side effect that makes me dislike the idea of modifying 
ASYNCHRONOUS.  (The other is that it incorrectly suggests that MPI calls 
have something to do with I/O which is not the case (except for the 
actual MPI I/O calls).)  If we use a different name, like 
ASYNC_EXTERNAL, is there any difference between that and VOLATILE?  I 
suspect not.  In which case, the obvious solution is to just use 
VOLATILE.  (Which was the conclusion of the previous round of 
discussions on this topic.)  VOLATILE had a couple of very attractive 
features.  It requires zero changes in either the Fortran standard or in 
any compiler implementations.  Thus, it is an immediately available 
solution for the MPI group.  VOLATILE might be strong enough to solve 
the code-motion problem as well.

Cheers,
Bill




-- 
Bill Long                                   longb@cray.com
Fortran Technical Support    &              voice: 651-605-9024
Bioinformatics Software Development         fax:   651-605-9142
Cray Inc., 1340 Mendota Heights Rd., Mendota Heights, MN, 55120

            

