Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!sol.ctr.columbia.edu!cica!news.cs.indiana.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxa.cso.uiuc.edu!rjtg0209 From: rjtg0209@uxa.cso.uiuc.edu Newsgroups: comp.lang.fortran Subject: Slow unformatted I/O Message-ID: <50700005@uxa.cso.uiuc.edu> Date: 4 Dec 90 15:06:00 GMT Lines: 37 Nf-ID: #N:uxa.cso.uiuc.edu:50700005:000:1419 Nf-From: uxa.cso.uiuc.edu!rjtg0209 Dec 4 09:06:00 1990 My programs do a lot of unformatted I/O. I hoped that such an I/O in FORTRAN is done close to the disk speed but this is not necessarily true. On some workstations, the I/O speeds have been a magnitude slower. I wrote the following program to benchmark the unformatted I/O: integer x(1000) open(1,file='scr',form='unformatted') do i=1,400 write(1)x enddo rewind 1 do i=1,400 read(1)x enddo end The problem is that the wall clock time for this program is much longer than the CPU time on several computers that I tested. Foe example, the CPU on SPARSTATION 1 shows the transfer rate of 2.5 Mbytes/s, while the wall clock time on the unloaded machine shows only 300 kbytes/s. Perhaps this is associated with the buffer size allocated for each open file. The real speed of loaded Cray-2 which has a 256 kbyte buffer is close to 15 Mbytes/s. The speed of my PC 386/33MhHZ with 640 Mbytes ESDI disk, using the program above and the Microsoft 5.0 compiler is 200 kbytes/s. However, if one reserves a 32k buffer by the blocksize option in the open statement, the speed increses four-fold, to 800 kbytes/s. Does anybody have any experiences with these kinds of problems? Which compilers have options to increase the buffer size or do it automatically? Please send your response to ignacy@uiucvmd.bitnet Ignacy Misztal University of Illinois Brought to you by Super Global Mega Corp .com