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
......@@ -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 *extra_data) {
#ifdef SWIFT_GRAVITY_FORCE_CHECKS
/* Unpack the data */
struct gpart *restrict gparts = (struct gpart *)map_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,
}
}
atomic_add(&data->counter_global, counter);
#else
error("Gravity checking function called without the corresponding flag.");
#endif
}
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment