anchor.diff:            if ( p(3) == L(3) ) p(3) = 0
          end if
          idx = compact_p_to_h(p, this%M) + 1
  -       !$omp atomic
  -       this%cell_count(idx) = this%cell_count(idx) + 1
  +       this%cell_count_tmp(idx, t_id) = this%cell_count_tmp(idx, t_id) + 1
  +    end do
  +    !$omp end do
  +    !$omp end parallel
  +
  +    !$omp parallel do private(t_id)
  +    do i = 1, this%N
  +       this%cell_count(i) = 0
  +       do t_id=1, t_max
  +          this%cell_count(i) = this%cell_count(i) + this%cell_count_tmp(i, t_id)
  +       end do
       end do
   
       this%cell_start(1) = 1
  
positive.code:      double precision :: a
       double precision :: origin(3)
       integer, allocatable :: cell_count(:)
       integer, allocatable :: cell_start(:)
       integer :: M(3)
       logical :: has_walls
  
negative.code: contains
  
    subroutine init(this, L, a, has_walls)
      use omp_lib
      class(cell_system_t), intent(out) :: this
      integer, intent(in) :: L(3)
      double precision, intent(in) :: a
  