OK, here is the code with all the command lines and explanations. You have just look at the numbers of write and read speed in GB/s it generates. The read speed is what could be super-high, in my case it is 4.4GB/s but the peak read and write speeds CrystalDiskMark shows for my RAMdisk is 12GB/s
! compilation for 32bit case :
! ftn95 equiv.f95 /set_error_level error 298 /no_truncate /nocheck /silent /opt >equiv_FTN895
! slink equiv.obj /stack:1200000000 >equivLink
!
integer, parameter :: ix = 10, iy=800000, iz=10
integer, parameter :: BSIZ = 4 * ix * iy * iz
character (Len=1) :: buf(BSIZ), bufRead(BSIZ)
integer*2 :: hndl, ecode
integer*8 :: nbytes = BSIZ
integer :: nread
!
!......... here is the major trick ...........
real*4 A(ix,iy,iz) ! Initial Big Data
equivalence (A,Buf) ! converts initial real*4 data to character*1
real*4 C(ix,iy,iz) ! Final Big Data
equivalence (C,bufRead) ! converts loaded character*1 data real*4
!
!............. setting up data ...............
do iiz=1,iz
do iiy=1,iy
do iix=1,ix
A(iix,iiy,iiz) = iix
enddo
enddo
enddo
print*, 'A=', A(1,1,1), A(2,1,1)
!............writing to disk..................
call openw@('Y.bin',hndl,ecode)
if(ecode /= 0)stop 'Error opening file Y.BIN for writing'
call cpu_time(t1)
call writef@(buf,hndl,nbytes,ecode)
call cpu_time(t2)
if(ecode /= 0)stop 'Error writing file Y.BIN'
call closef@(hndl,ecode)
write(*,'(A,2x,i7, F7.3,A)')'Time for writing file of size MB: ',BSIZ/1000000, t2-t1,' s'
write(*,'(A,6x,F6.0,A)')'Estimated throughput = ',BSIZ/1000000/max(1.e-6,(t2-t1)),' MB/s'
! ...........reading from disk................
call openr@('Y.bin',hndl,ecode)
if(ecode /= 0)stop 'Error opening file BIG.BIN for writing'
call cpu_time(t1)
call readf@(bufRead,hndl,nbytes,nread,ecode)
call cpu_time(t2)
if(ecode /= 0)stop 'Error reading file BIG.BIN'
call closef@(hndl,ecode)
write(*,'(A,2x,i7, F7.3,A)')'Time for reading file of size MB: ',BSIZ/1000000, t2-t1,' s'
write(*,'(A,6x,F6.0,A)')'Estimated throughput = ',BSIZ/1000000/max(1.e-6,(t2-t1)),' MB/s'
print*, 'Checking if C=A', C(1,1,1), C(2,1,1)
end