diff --git a/tests/benchmarkInteractions.c b/tests/benchmarkInteractions.c index b36f00c52901a017dc937bd4e66817bc3ce9cb94..b04967d17f5f2186c348c9ce76bab66f66ddf715 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 2ef32a5ef11c7e24a379ce5131df9cbea153fa7c..0cd3d6f698eb393d6e17be4b0c08e475151aff9c 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);