!------------------------ ! test sequential file read/write Program Main character :: Txt2*8, Txt*8 Integer, parameter :: N=4*1024**2, M=100, Nsm =1024, Msm=100000 Real*8 :: A(N),B(Nsm) A(:) = 0. Size = 8.*float(N)/1024.**2*M write(*,*) ' File size= ',Size,'MB',' Record=',8.*float(N)/1024.**2,'MB' Do j=1,3 Open(10,file='test.write.dat',form='unformatted') call system_clock(i1,i2) call cpu_time(t0) Do i=1,M write(10) A end Do close(10) call cpu_time(t1) call system_clock(i1b,i2b) wc = float(i1b-i1)/i2b write (*,'(4(a,g12.4))') ' cpu time (seconds) =',t1-t0, & ' wall-clock time=',wc,' IO (Mb/sec)=',Size/wc !call system('/bin/rm test.write.dat') end Do ! small records B(:) = 0. Size = 8.*float(Nsm)/1024.**2*Msm write(*,*) ' File size= ',Size,'MB',' Record=',8.*float(Nsm)/1024.**2,'MB' Do j=1,3 Open(10,file='test.write.dat',form='unformatted') call system_clock(i1,i2) call cpu_time(t0) Do i=1,Msm write(10) B end Do close(10) call cpu_time(t1) call system_clock(i1b,i2b) wc = float(i1b-i1)/i2b write (*,'(4(a,g12.4))') ' cpu time (seconds) =',t1-t0, & ' wall-clock time=',wc,' IO (Mb/sec)=',Size/wc end Do call system('/bin/rm test.write.dat') end Program Main