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

Do not compile the gravity force check parallel functions if we are not checking gravity.

parent 33fcb8d3
No related branches found
No related tags found
1 merge request!333Gravity multi dt
...@@ -94,6 +94,8 @@ int gravity_exact_force_file_exits(const struct engine *e) { ...@@ -94,6 +94,8 @@ int gravity_exact_force_file_exits(const struct engine *e) {
*/ */
void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts, void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts,
void *extra_data) { void *extra_data) {
#ifdef SWIFT_GRAVITY_FORCE_CHECKS
/* Unpack the data */ /* Unpack the data */
struct gpart *restrict gparts = (struct gpart *)map_data; struct gpart *restrict gparts = (struct gpart *)map_data;
struct exact_force_data *data = (struct exact_force_data *)extra_data; struct exact_force_data *data = (struct exact_force_data *)extra_data;
...@@ -170,6 +172,10 @@ void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts, ...@@ -170,6 +172,10 @@ void gravity_exact_force_compute_mapper(void *map_data, int nr_gparts,
} }
} }
atomic_add(&data->counter_global, counter); atomic_add(&data->counter_global, counter);
#else
error("Gravity checking function called without the corresponding flag.");
#endif
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment