Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!ucbvax!SMAUG.PHYSICS.MCGILL.CA!igraham From: igraham@SMAUG.PHYSICS.MCGILL.CA (Ian Graham) Newsgroups: comp.sys.sgi Subject: Weird Fortran i/o? Message-ID: <9105031951.AA02478@smaug.physics.mcgill.ca> Date: 3 May 91 19:51:25 GMT Sender: daemon@ucbvax.BERKELEY.EDU Organization: The Internet Lines: 64 Hello, A user on our system was checking benchmarks for system i/o on IRIS/SUN/HP9000/DECSTATION and came up with the following quirky results: (THe code is given at the bottom) THe program writes 100000 bunches of 4 integers into a direct access fie, rewinds, and reads 'em all back. Here are the results for a 4D-25: START-TIME 0.0100 0.0700 IO WRITE 8.9400 4.7600 IO READ 26.4600 353.0300 <<---!!!!!! So what gives? Why should it take 5 MINUTES to read some data written in 5 SECONDS! On a Decstation 3000 (same CPU chipset...) the OPPOSITE is true -- it takes 5 minutes to WRITE the file, and only 5 seconds to READ it! On a Sun-3 things are altogether slower, but again the write is much slower than the read: IO WRITE 100.4800 320.0400 IO READ 50.7400 8.1800 Meanwhile on an HP9000 (Snake!??!) it takes only 5 seconds to read and/or write. Nice if you are heavily i/o bound and running Fortran (as is the case for this user.) Anyone know what's going on? HEre are the system specifics, as far as I know them, and the test code: IRIS 4D-25, IRIX 3.3.1 SUN SUN3-180, SUNOS3.5 DEC Decsation 3100, ?? HP HP9000-720 ?? PROGRAM QUICKTEST C Date: Fri, 03 May 91 12:56:28 EDT C From: "Dave Gilkinson, hero at large 398-6511 " REAL TARRAY(2) A= DTIME(TARRAY) WRITE(6,100)TARRAY(1),TARRAY(2) 100 FORMAT(' START-TIME ',F10.4,2X,F10.4) DO I = 1, 100000 WRITE(99) I,I+1,I+2,I+3 ENDDO B = DTIME(TARRAY) WRITE(6,130)TARRAY(1),TARRAY(2) 130 FORMAT(' IO WRITE ', F10.4,2X,F10.4 ) REWIND(99) DO I = 1, 100000 READ(99)K,L,M,N ENDDO B = DTIME(TARRAY) WRITE(6,140)TARRAY(1),TARRAY(2) 140 FORMAT(' IO READ ', F10.4,2X,F10.4 ) STOP END ___________________________________________ Ian Graham ______________ igraham@physics.mcgill.ca Tel: (514) 398-6526 Fax: (514) 398-8434