From owner-sc22wg5@open-std.org  Sat Jan 24 12:59:09 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 8F902CA3432; Sat, 24 Jan 2009 12:59:09 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-1.csi.cam.ac.uk (ppsw-1.csi.cam.ac.uk [131.111.8.131])
	by www2.open-std.org (Postfix) with ESMTP id EFDE8C56CFB
	for <sc22wg5@open-std.org>; Sat, 24 Jan 2009 12:59:07 +0100 (CET)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:59528)
	by ppsw-1.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.151]:25)
	with esmtpa (EXTERNAL:nmm1) id 1LQhAH-0008M6-4L (Exim 4.70)
	(return-path <nmm1@hermes.cam.ac.uk>); Sat, 24 Jan 2009 11:59:05 +0000
Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1LQhAH-0001mY-Ao (Exim 4.67)
	(return-path <nmm1@hermes.cam.ac.uk>); Sat, 24 Jan 2009 11:59:05 +0000
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.1); 24 Jan 2009 11:59:05 +0000
Date: 24 Jan 2009 11:59:05 +0000
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: MPI-3 Fortran working group <mpi3-fortran@lists.mpi-forum.org>,
	WG5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.3920) [MPI3 Fortran] (j3.2006)	(SC22WG5.3917)	(SC22WG5.3909)	 [MPI3	Fortran]	MPI	non-blocking transfers
Message-ID: <Prayer.1.3.1.0901241159050.3908@hermes-2.csi.cam.ac.uk>
In-Reply-To: <20090123233233.B4917CA5FED@www2.open-std.org>
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>
 <Prayer.1.3.1.0901221006510.28472@hermes-2.csi.cam.ac.uk>
 <1232658808.15119.824.camel@math.jpl.nasa.gov>
 <20090123095622.CBD80CA5FED@www2.open-std.org>
 <20090123190515.A5B24CA5FE6@www2.open-std.org>
 <497A1CE5.3000708@cray.com>
 <Prayer.1.3.1.0901232009180.25233@hermes-2.csi.cam.ac.uk>
 <20090123204209.615C8CA5FED@www2.open-std.org>
 <1232747203.15119.979.camel@math.jpl.nasa.gov>
 <497A51B9.3080304@cray.com>
 <20090123233233.B4917CA5FED@www2.open-std.org>
X-Mailer: Prayer v1.3.1
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Jan 23 2009, Van Snyder wrote:
>
>> The copy-in/copy-out problem does not affect MPI_wait.  There's no
>> argument to copy anyway.  Copy-in/copy-out is a serious problem for the
>> earlier call to MPI_Isend, etc. where you do not want the copy temp
>> being the buffer MPI sees, since it will get deleted when the call
>> returns (which is before MPI is done with it.)   This continues with any
>> subsequent call to other routines that have the buffer as the argument,
>> because a copy-out runs the risk of overwriting the buffer with the
>> wrong values.
>
>The copy-in/copy-out problem appears to be pretty simple:  Define the
>buffer dummy argument of MPI_Isend to be ASYNCHRONOUS and assumed size.
>Then if somebody hands it an assumed-shape or pointer buffer that's not
>contiguous, the code falls afoul of C1239 or C1240.  If the user's data
>isn't contiguous, it's his responsibility to do the copying at the right
>time.

I agree.

>I don't see the need for changes in the standard, either for the
>copy-in/copy-out problem, or the code motion problem.  Just define the
>MPI interface properly.

The only change that I think is necessary is some minor wording changes to
extend the description to cover asynchronous I/O performed by a companion
processor as well as Fortran asynchronous I/O.  Technically, that's trivial.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@cam.ac.uk
Tel.:  +44 1223 334761    Fax:  +44 1223 334679


