Commit 67a7a2da authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Protect the receive task against use in non-MPI context.

parent 7626e4d2
...@@ -954,6 +954,8 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) { ...@@ -954,6 +954,8 @@ void runner_do_kick(struct runner *r, struct cell *c, int timer) {
*/ */
void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) { void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) {
#ifdef WITH_MPI
const struct part *restrict parts = c->parts; const struct part *restrict parts = c->parts;
const struct gpart *restrict gparts = c->gparts; const struct gpart *restrict gparts = c->gparts;
const size_t nr_parts = c->count; const size_t nr_parts = c->count;
...@@ -1005,6 +1007,10 @@ void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) { ...@@ -1005,6 +1007,10 @@ void runner_do_recv_cell(struct runner *r, struct cell *c, int timer) {
c->h_max = h_max; c->h_max = h_max;
if (timer) TIMER_TOC(timer_dorecv_cell); if (timer) TIMER_TOC(timer_dorecv_cell);
#else
error("SWIFT was not compiled with MPI support.");
#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