anchor.diff:     close(un)
      close(una)
   
  -   !---------------------------------------------
  -   ! Elapsed time
  -   !---------------------------------------------
  -   call cpu_time(total_time)
  -   total_time = total_time - start_time
  -   print*, 'Elapsed time:', total_time
  -
   end program n_body
  
positive.code:    real(kind = xp) :: E                 ! Total energy
     integer         :: iter      = 0     ! Number of iterations ran
     integer         :: dump_freq = 10    ! Frequency at which the system is sampled
     integer         :: maxiter   = 10000 ! Maximum number of iterations
  
     real :: start_time, total_time
  
     !---------------------------------------------
     ! Start time
     !---------------------------------------------
     call cpu_time(start_time)
  
     !---------------------------------------------
     ! Read initial positions
  
negative.code:       iter = iter + 1
  
        if (mod(iter, dump_freq) == 0) then
           print *, 'Dump', iter
           call compute_energy(m, r, v, Ec, Ep, E) ! Compute Ec, Ep, E at t+dt
           call write_dump(una, un, iter, Ec, Ep, E, t, r, v)
        end if
  