From 2d8299532eb1fa3ed0cc6f435c5fdbdc5e8b985c Mon Sep 17 00:00:00 2001
From: Matthieu Schaller <matthieu.schaller@durham.ac.uk>
Date: Thu, 2 Feb 2017 10:51:06 +0000
Subject: [PATCH] Make sure the tests in the test suite still pass...

---
 tests/benchmarkInteractions.c | 6 +++++-
 tests/testReading.c           | 7 ++++---
 2 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/tests/benchmarkInteractions.c b/tests/benchmarkInteractions.c
index b36f00c529..b04967d17f 100644
--- a/tests/benchmarkInteractions.c
+++ b/tests/benchmarkInteractions.c
@@ -237,9 +237,9 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
   float r2[count] __attribute__((aligned(array_align)));
   float dx[3 * count] __attribute__((aligned(array_align)));
 
+#ifdef WITH_VECTORIZATION
   struct part *piq[count], *pjq[count];
 
-#ifdef WITH_VECTORIZATION
   float r2q[count] __attribute__((aligned(array_align)));
   float hiq[count] __attribute__((aligned(array_align)));
   float dxq[count] __attribute__((aligned(array_align)));
@@ -338,10 +338,12 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
 
     /* Only dump data on first run. */
     if (k == 0) {
+#ifdef WITH_VECTORIZATION
       /* Dump state of particles before vector interaction. */
       dump_indv_particle_fields(vec_filename, piq[0]);
       for (size_t i = 0; i < count; i++)
         dump_indv_particle_fields(vec_filename, pjq[i]);
+#endif
     }
 
 /* Perform vector interaction. */
@@ -407,10 +409,12 @@ void test_interactions(struct part test_part, struct part *parts, size_t count,
   fprintf(file, "\n# PARTICLES AFTER INTERACTION:\n");
   fclose(file);
 
+#ifdef WITH_VECTORIZATION
   /* Dump result of serial interaction. */
   dump_indv_particle_fields(vec_filename, piq[0]);
   for (size_t i = 0; i < count; i++)
     dump_indv_particle_fields(vec_filename, pjq[i]);
+#endif
 
 #ifdef WITH_VECTORIZATION
   /* Check serial results against the vectorised results. */
diff --git a/tests/testReading.c b/tests/testReading.c
index 2ef32a5ef1..0cd3d6f698 100644
--- a/tests/testReading.c
+++ b/tests/testReading.c
@@ -25,13 +25,14 @@
 
 int main() {
 
-  size_t Ngas = 0, Ngpart = 0;
+  size_t Ngas = 0, Ngpart = 0, Nspart = 0;
   int periodic = -1;
   int flag_entropy_ICs = -1;
   int i, j, k;
   double dim[3];
   struct part *parts = NULL;
   struct gpart *gparts = NULL;
+  struct spart *sparts = NULL;
 
   /* Default unit system */
   struct UnitSystem us;
@@ -43,8 +44,8 @@ int main() {
   const double rho = 2.;
 
   /* Read data */
-  read_ic_single("input.hdf5", &us, dim, &parts, &gparts, &Ngas, &Ngpart,
-                 &periodic, &flag_entropy_ICs, 0);
+  read_ic_single("input.hdf5", &us, dim, &parts, &gparts, &sparts, &Ngas,
+		 &Ngpart, &Nspart, &periodic, &flag_entropy_ICs, 1, 1, 0, 0);
 
   /* Check global properties read are correct */
   assert(dim[0] == boxSize);
-- 
GitLab