(j3.2006) (SC22WG5.3629) [ukfortran] A comment on John Wallin's comments on Nick MacLaren's comments
N.M. Maclaren
nmm1
Thu Nov 6 03:20:18 EST 2008
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 at cam.ac.uk
Tel.: +44 1223 334761 Fax: +44 1223 334679
More information about the J3
mailing list