From owner-sc22wg5@open-std.org  Thu Nov  6 09:20:20 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 DE7C6CA343A; Thu,  6 Nov 2008 09:20:20 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-7.csi.cam.ac.uk (ppsw-7.csi.cam.ac.uk [131.111.8.137])
	by www2.open-std.org (Postfix) with ESMTP id 58D06CA3434
	for <sc22wg5@open-std.org>; Thu,  6 Nov 2008 09:20:19 +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-1.csi.cam.ac.uk ([131.111.8.51]:41584)
	by ppsw-7.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.157]:25)
	with esmtpa (EXTERNAL:nmm1) id 1Ky06E-00089s-PE (Exim 4.70) for sc22wg5@open-std.org
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 06 Nov 2008 08:20:18 +0000
Received: from prayer by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1Ky06E-0007qM-Q3 (Exim 4.67) for sc22wg5@open-std.org
	(return-path <nmm1@hermes.cam.ac.uk>); Thu, 06 Nov 2008 08:20:18 +0000
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.1); 06 Nov 2008 08:20:18 +0000
Date: 06 Nov 2008 08:20:18 +0000
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: sc22wg5 <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.3624) (j3.2006) A comment on John	Wallin's	comments on	Nick MacLaren's comments
Message-ID: <Prayer.1.3.1.0811060820180.8016@hermes-1.csi.cam.ac.uk>
In-Reply-To: <20081105234957.26CCCCA3434@www2.open-std.org>
References: <20081105225653.DCEA7CA3428@www2.open-std.org>
 <20081105234957.26CCCCA3434@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 Nov 5 2008, Van Snyder wrote:
>
>> However, I am not saying that internal FIFOs aren't a good communication
>> mechanism - far from it - merely that MPI is more than that.
>
>It must be far more, since it takes 406 pages to describe it, while all
>of Fortran I/O takes "only" 74 pages (in 08-007r1).  Putting loops
>around point-to-point using Fortran I/O still seems simpler than 406
>pages of MPI.  ...

I am not going to justify the complexity of MPI (or debate the merits of
Fortran I/O versus MPI point-to-point), but will just comment that it is
VERY hard for an ordinary programmer to use either correctly in a parallel
program with more than a trivial structure.  Collectives are FAR easier
to use.

Note that that remark is also relevant to coarrays.  If they are included,
there should be work on a proper high-level module, to include collectives.
But there is no time to design that before Tokyo!

>Maybe I just haven't been holding my mouth right, or maybe I didn't
>explain the correct problem.  My home directory is on a file server that
>is NFS mounted onto my computer.  When I do this on my computer:
>
># mkfifo foo

Mistake number 1.  Those are not supported by NFS in any useful way.  Sorry.
You can transfer data with FIFO semantics by using an ordinary file, though
you don't get the equivalent of the signals telling you when the other end
has closed.

And I am not going to justify why mkfifo/NFS allows you to create files that
aren't going to work, either - personally, I think hanging is too good for
people who regard that as an appropriate specification.

>I also wrote two little Fortran programs that opened a formatted file.
>One read from stdin and wrote to the file, the other read from the file
>and wrote to stdout.  If the file is a fifo and both programs run on the
>same computer, the read->stdout program prints what I input to the
>stdin->write program.  But if I run them on different computers that
>have access to the same file system, they both hang.

God alone knows what is going on there.  Find a local system expert and ask.
Here is a simple test I wrote just now (with domain removed for security):

pc52:~$ uname -a Linux pc52.* 2.6.16.60-0.27-smp #1 SMP Mon Jul 28 12:55:32 
UTC 2008 x86_64 x86_64 x86_64 GNU/Linux pc52:~$ cat fred.f90 program main
    character(len=20) :: message
    open (11, file='gerbil', action='write', status='new', 
form='unformatted')
    do
        read (*,*,end=10) message
        write (11) message
        flush (11)
    end do
10  continue
end program main
pc52:~$ ifort -o fred fred.f90
pc52:~$ ./fred
Hello
'Kilroy was here'
Goodbye

pc53:~$ uname -a Linux pc53.* 2.6.16.60-0.27-default #1 Mon Jul 28 12:18:13 
UTC 2008 x86_64 x86_64 x86_64 GNU/Linux pc53:~$ cat joe.f90 program main
    character(len=20) :: message
    open (11, file='gerbil', action='read', status='old', 
form='unformatted')
    do
        read (11,end=10) message
        write (*,*) message
    end do
10  continue
end program main
pc53:~$ ifort -o joe joe.f90
pc53:~$ ./joe
 Hello
 Kilroy was here
 Goodbye


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

