Xref: utzoo comp.sys.sgi:8611 comp.lang.fortran:4896 Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!uunet!elroy.jpl.nasa.gov!ames!sgi!bron@bronze.wpd.sgi.com From: bron@bronze.wpd.sgi.com (Bron Campbell Nelson) Newsgroups: comp.sys.sgi,comp.lang.fortran Subject: Re: SGI comments? Summary: file access Keywords: SGI info, FORTRAN Message-ID: <88688@sgi.sgi.com> Date: 4 Mar 91 20:17:21 GMT References: <958@vax.cs.athabascau.ca> <88675@sgi.sgi.com> Sender: guest@sgi.sgi.com Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 33 In article <88675@sgi.sgi.com>, bron@bronze.wpd.sgi.com (Bron Campbell Nelson) writes: > In article <958@vax.cs.athabascau.ca>, willis@cs.athabascau.ca (Tony Willis) writes: > > Most of my FORTRAN I/O comes from reading/writing > > direct access files more or less like > > > > DO 300 I = 1, 1024 > > WRITE(UNIT=12,REC=I)(DATA(J,I),J=1,1024) > > 300 CONTINUE > > > > Could I replace this sort of thing by calls to C and > > speed up the I/O, particularly in multi-user mode? (Come on > > you SGI guys in Mountain View - help make a sale!!) > > > > The use of direct access file complicates interfacing to C a bit. > You'd need to know the format of records on the disk, which sadly > I do not. I'll ask my co-worker who knows this stuff to comment. > I talked to the man with the answers, and he tells me that direct access files are in fact laid out in the simple straight forward manner: each record has RECORD-LENGTH bytes in it, and record number one begins at byte zero in the file. If I understand the above loop correctly, we could interface directly to the "write" system call and replace the loop with: istatus = write(12, data, 1024*1024*recordLength) which should speed up this I/O operation by a LOT. -- Bron Campbell Nelson bron@sgi.com or possibly ..!ames!sgi!bron These statements are my own, not those of Silicon Graphics.