Skip to content
Snippets Groups Projects
Commit 2d829953 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Make sure the tests in the test suite still pass...

parent c8ccc9c8
No related branches found
No related tags found
1 merge request!310Star particles and gparts links over MPI
......@@ -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. */
......
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment