The following Fortran code is compiled using intel visual Fortran compiler and run on Mac and Windows systems, respectively. On Mac, The generated two files are different as expected. However, on Windows, the two files are the same. I don't know what's wrong.
program main
implicit none
integer :: n1 = 2, n2 = 10
integer :: j,k
real(8) :: u_random(10)
!generating random numbers
open(11,file='random.dat',form='unformatted')
do j = 1, n1
call random_seed()
do k = 1, n2
call random_number(u_random(k))
enddo
write(11) u_random
enddo
close(11)
!write random numbers to files
open(11,file='random.dat',form='unformatted')
!first 10 numbers
read(11) u_random
open(12,file='check1.txt')
do k = 1, n2
write(12,*) u_random(k)
enddo
close(12)
!next 10 numbers
read(11) u_random
open(12,file='check2.txt')
do k = 1, n2
write(12,*) u_random(k)
enddo
close(12)
close(11)
end