szabo_p@maths.su.oz.au (Paul Szabo) (10/26/90)
In FORTRAN, to write a file you OPEN it and then WRITE to the unit. Somehow, this generates an inordinate amount of network traffic! An example: open (9,file='silly.out',status='new') do i=1,1000 write (9,99) 'Just saying HELLO ...' end do 99 format (a) end Running this (on a diskless node), using /etc/nodestat to display network I/O statistics before and after, we see that this program generates 13515 packets (6871 receive, 6644 transmit). Now this is something like 12 packets per line, or 12kbytes per each line of 22 bytes, or a 500-fold increase in traffic! If instead we used WRITE to unit 6, and then used the shell's redirection (>) to write the file, we would have generated only about 250 packets (including all overheads, even the /etc/nodestat itself). No problems are seen either if we re-write the program in C (using fopen and fprintf). But using status='write' or recl=25 in the OPEN statement seems to have no effect. Has anyone come across this problem before? Is this a nasty bug, or is there a simple workaround? Any insight would be appreciated. We are desperate: imagine a couple of dozen undergraduate students trying to write some files using trivial little FORTRAN programs... Paul Szabo szabo_p@maths.su.oz.au
kahlers@ux1.cso.uiuc.edu (10/27/90)
> In FORTRAN, to write a file you OPEN it and then WRITE to the unit. > Somehow, this generates an inordinate amount of network traffic! There is a patch (for SR10.2, I think) which corrects a bad performance problem with the Fortran write library routines. It is a new ftnlib. This patch sure helped our Fortran write performance problems. Do you have this patch installed? -Kem ======================================================================== Kem Ahlers kahlers.ux1.cso.uiuc.edu (Internet) Caterpillar, Inc. u36009@ncsagate (Bitnet) Peoria, IL USA uunet!uiucuxc!uiucux1!kahlers (uucp)