From 4f4227c4288bff8f33c616c462918a78d42146a3 Mon Sep 17 00:00:00 2001 From: Matthieu Schaller <matthieu.schaller@durham.ac.uk> Date: Tue, 7 Jun 2016 14:28:46 +0200 Subject: [PATCH] Post-merge fixes --- src/engine.c | 26 +++++++++++++------------- src/kernel_gravity.h | 12 ++++++------ src/tools.h | 1 - tests/testKernel.c | 6 +++++- 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/engine.c b/src/engine.c index ae1413be76..c0ba9444dc 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1586,23 +1586,23 @@ void engine_maketasks(struct engine *e) { /* Add the communication tasks if MPI is being used. */ if (e->policy & engine_policy_mpi) { - /* Loop over the proxies. */ - for (int pid = 0; pid < e->nr_proxies; pid++) { + /* Loop over the proxies. */ + for (int pid = 0; pid < e->nr_proxies; pid++) { - /* Get a handle on the proxy. */ - struct proxy *p = &e->proxies[pid]; + /* Get a handle on the proxy. */ + struct proxy *p = &e->proxies[pid]; - /* Loop through the proxy's incoming cells and add the - recv tasks. */ - for (int k = 0; k < p->nr_cells_in; k++) - engine_addtasks_recv(e, p->cells_in[k], NULL, NULL); + /* Loop through the proxy's incoming cells and add the + recv tasks. */ + for (int k = 0; k < p->nr_cells_in; k++) + engine_addtasks_recv(e, p->cells_in[k], NULL, NULL); - /* Loop through the proxy's outgoing cells and add the - send tasks. */ - for (int k = 0; k < p->nr_cells_out; k++) - engine_addtasks_send(e, p->cells_out[k], p->cells_in[0]); + /* Loop through the proxy's outgoing cells and add the + send tasks. */ + for (int k = 0; k < p->nr_cells_out; k++) + engine_addtasks_send(e, p->cells_out[k], p->cells_in[0]); + } } -} #endif /* Set the unlocks per task. */ diff --git a/src/kernel_gravity.h b/src/kernel_gravity.h index 352ba4870f..6a1e238f82 100644 --- a/src/kernel_gravity.h +++ b/src/kernel_gravity.h @@ -25,12 +25,12 @@ #include "inline.h" #include "vector.h" -#define const_iepsilon (1. / const_epsilon) -#define const_iepsilon2 (const_iepsilon *const_iepsilon) -#define const_iepsilon3 (const_iepsilon2 *const_iepsilon) -#define const_iepsilon4 (const_iepsilon2 *const_iepsilon2) -#define const_iepsilon5 (const_iepsilon3 *const_iepsilon2) -#define const_iepsilon6 (const_iepsilon3 *const_iepsilon3) +/* #define const_iepsilon (1. / const_epsilon) */ +/* #define const_iepsilon2 (const_iepsilon *const_iepsilon) */ +/* #define const_iepsilon3 (const_iepsilon2 *const_iepsilon) */ +/* #define const_iepsilon4 (const_iepsilon2 *const_iepsilon2) */ +/* #define const_iepsilon5 (const_iepsilon3 *const_iepsilon2) */ +/* #define const_iepsilon6 (const_iepsilon3 *const_iepsilon3) */ /* The gravity kernel is defined as a degree 6 polynomial in the distance r. The resulting value should be post-multiplied with r^-3, resulting diff --git a/src/tools.h b/src/tools.h index e05c93bdec..0e60980207 100644 --- a/src/tools.h +++ b/src/tools.h @@ -25,7 +25,6 @@ #include "cell.h" #include "physical_constants.h" #include "runner.h" -#include "cell.h" void factor(int value, int *f1, int *f2); void density_dump(int N); diff --git a/tests/testKernel.c b/tests/testKernel.c index 182bae5334..700352ccb9 100644 --- a/tests/testKernel.c +++ b/tests/testKernel.c @@ -17,7 +17,7 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. * ******************************************************************************/ - +#ifdef __AVX__ #define NO__AVX__ #include "kernel_hydro.h" #include "vector.h" @@ -86,3 +86,7 @@ int main() { printf("\nAll values are consistent\n"); return 0; } + +#else +int main() { return 0; } +#endif -- GitLab