c c test file read performance c c ------- read 10MB file c c 1999.4.15 T. Ichihara (RIKEN) c Sun solaris c f77 -silent -o fwrite_100MBxN.sunbin fwrite_100MBxN.f -lV77 c real*4 bf100 (250000) character*80 file1 character*8 wtime, ws1,ws2 integer ibk data bf100/250000*0.0/,isum/0/ len = 250000 c c solaris f77 -lv77 c c1 write(6,*) 'file size (10MB x N) N ?' c read (5,*) ibk c if(ibk.le.0.or.ibk.gt.999) goto 1 ibk=10 file1=' 10MB.td' c write(file1(1:3),'(I3)') ibk c open(1,file=file1,status='old',form='unformatted') call time(ws1) write(6,101) file1 101 format(' file',A20,'open for read ') c c read 1MB block for ibk-times c do ix=1,ibk c bf100(1)=ix isum=isum+ixL read(1,err=999,end=998) bf100 isum=isum+ix call time(wtime) ws2=wtime write(6,100) ix 100 format(1X,I3,'MB read ') enddo ws2=wtime c c write(6,*) ' file read succefully, Check SUM=', isum stop 999 write(6,*) 'file read error' stop 998 write(6,*) 'EOF detected during file read' end