Size of long array

Size has an optional kind argument. You could try that.

i.e.

program size_test
  integer(8) :: n
  real(8), allocatable :: x(:)
  n = 3d9
  allocate(x(n))
  print *, size(x, kind=kind(n))
end program
2 Likes