SGI comments?

Bron Campbell Nelson bron at bronze.wpd.sgi.com
Tue Mar 5 06:17:21 AEST 1991


In article <88675 at sgi.sgi.com>, bron at bronze.wpd.sgi.com (Bron Campbell Nelson) writes:
> In article <958 at vax.cs.athabascau.ca>, willis at 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 at sgi.com  or possibly  ..!ames!sgi!bron
These statements are my own, not those of Silicon Graphics.



More information about the Comp.sys.sgi mailing list