From owner-sc22wg5@open-std.org Thu Nov 13 08:00:09 2008 Return-Path: X-Original-To: sc22wg5-dom7 Delivered-To: sc22wg5-dom7@www2.open-std.org Received: by www2.open-std.org (Postfix, from userid 521) id 74F04CA343B; Thu, 13 Nov 2008 08:00:09 +0100 (CET) X-Original-To: sc22wg5@open-std.org Delivered-To: sc22wg5@open-std.org Received: from ns.nag-j.co.jp (218-42-159-107.cust.bit-drive.ne.jp [218.42.159.107]) by www2.open-std.org (Postfix) with ESMTP id 84CA6C178D9 for ; Thu, 13 Nov 2008 08:00:07 +0100 (CET) Received: from 218-42-159-108.cust.bit-drive.ne.jp ([218.42.159.108] helo=[127.0.0.1]) by ns.nag-j.co.jp with esmtp (Exim 4.50) id 1L0WBH-0002bn-Ba for sc22wg5@open-std.org; Thu, 13 Nov 2008 15:59:55 +0900 Message-ID: <491BD083.1080101@nag-j.co.jp> Date: Thu, 13 Nov 2008 16:00:19 +0900 From: Malcolm Cohen User-Agent: Thunderbird 3.0a1pre (Windows/2008022014) MIME-Version: 1.0 To: WG5 Subject: Re: [ukfortran] (SC22WG5.3670) (j3.2006) N1755: Request for new features from MPI Forum References: <49137AD3.1070402@lrz.de> <20081111224927.8201CC178D9@www2.open-std.org> <20081111234923.517C5C178D6@www2.open-std.org> <20081112001017.26EB3C178D6@www2.open-std.org> <20081112091351.6581CC178D9@www2.open-std.org> <20081113032342.3E36AC178D9@www2.open-std.org> In-Reply-To: <20081113032342.3E36AC178D9@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 Aleksandar Donev wrote that INTENT(IN) doesn't really mean INTENT(IN) if you make it VOLATILE. I say: Well that's just execrable design, please flush it away. > If the programmer knows that the value of the actual can change during > the execution of the program by means outside of the program (which, > by the way, are under the control and responsibility of the > programmer, not God!) It's certainly not necessarily under the control of the programmer unless she is also God, and maybe not even then. > The INTENT(IN) attribute means that the value should not change > because of actions in the routine itself. Nope. Destroying the meaning and effect of INTENT(IN) is not in any way acceptable. If you really must, add a new INTENT(I won't change this variable in any obvious way but behind the scenes ha ha), 'cause that seems to be what is being described here. > VOLATILE simply means (in my book) that the value changes by means > other than Fortran, Yes. > not by means out of the control of the programmer. No. *Might* not be out of control, but is certainly allowed to be (one can argue as to whether it usually is or not). > If you call an external I/O routine, like MPI, and it works > asynchronously, there is no difference with Fortran ASYNCHRONOUS I/O Well ... yes and no. The optimisation implications are in fact somewhat different (and I'm not sure whether MPI-2's design is consistent with ASYNC). > and what you need to do is use the VOLATILE attribute instead. I am > well-aware this is not a good language design, but it is the only > legal option within the Fortran 2003 standard, and in fact, one of the > intended uses of VOLATILE. Absolutely correct. One of the main purposes in fact - I doubt it would have been added otherwise. Whether that situation ought to persist in Fortran 2008, with MPI being revised as well, is another matter. But unless J3 and/or WG5 get more involved with MPI (as perhaps they ought) then it's probably best to leave well enough alone. Or in this case, to leave the horrible mess alone. > > BTW, I was not involved in J3 when VOLATILE/ASYNCHRONOUS were added > either... > There were a number of dead bodies VOLATILE was added over the objections of, so just being a J3 member doesn't mean one thinks VOLATILE was (a) a good idea or (b) done correctly. Cheers, -- ......................Malcolm Cohen, Nihon NAG, Tokyo.