From dee27176c2a60803bce788767374e51a6fa82ae5 Mon Sep 17 00:00:00 2001
From: James Willis <james.s.willis@durham.ac.uk>
Date: Fri, 22 Sep 2017 15:12:44 +0100
Subject: [PATCH] Loop over everything to debug.

---
 src/runner_doiact_vec.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/runner_doiact_vec.c b/src/runner_doiact_vec.c
index 00fc44ae59..f3d9ed2ec4 100644
--- a/src/runner_doiact_vec.c
+++ b/src/runner_doiact_vec.c
@@ -1474,6 +1474,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
                                     hi_max, hj_max, di_max, dj_min, max_index_i,
                                     max_index_j, &first_pi, &last_pj, e);
 
+  first_pi = 0;
+  last_pj = count_j - 1;
+
   /* Limits of the outer loops. */
   int first_pi_loop = first_pi;
   int last_pj_loop = last_pj;
@@ -1482,6 +1485,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
    * to read into the cache. */
   last_pj = max(last_pj, max_index_i[count_i - 1]);
   first_pi = min(first_pi, max_index_j[0]);
+  
+  first_pi = 0;
+  last_pj = count_j - 1;
 
   /* Read the needed particles into the two caches. */
   int first_pi_align = first_pi;
@@ -1490,6 +1496,9 @@ void runner_dopair2_force_vec(struct runner *r, struct cell *ci,
                                             sort_j, shift, &first_pi_align,
                                             &last_pj_align, 1);
 
+  for(int i=0; i<count_i; i++) max_index_i[i] = last_pj;
+  for(int i=0; i<count_j; i++) max_index_j[i] = first_pi;
+
   /* Get the number of particles read into the ci cache. */
   int ci_cache_count = count_i - first_pi_align;
 
-- 
GitLab