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

Make communication tasks vanish when running non-MPI version of the code.

parent 8f88c063
Branches
Tags
1 merge request!225Only drift the particles that need drifting
......@@ -23,6 +23,9 @@
#ifndef SWIFT_CELL_H
#define SWIFT_CELL_H
/* Config parameters. */
#include "../config.h"
/* Includes. */
#include <stddef.h>
......@@ -124,11 +127,13 @@ struct cell {
/* The hierarchical tasks. */
struct task *ghost, *init, *kick;
#ifdef WITH_MPI
/* Task receiving data. */
struct task *recv_xv, *recv_rho, *recv_ti;
/* Task send data. */
struct link *send_xv, *send_rho, *send_ti;
#endif
/* Tasks for gravity tree. */
struct task *grav_up, *grav_down;
......
......@@ -1865,6 +1865,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
}
}
#ifdef WITH_MPI
/* Activate the send/recv flags. */
if (ci->nodeID != engine_rank) {
......@@ -1919,6 +1921,8 @@ void engine_marktasks_mapper(void *map_data, int num_elements,
if (l == NULL) error("Missing link to send_ti task.");
l->t->skip = 0;
}
#endif
}
/* Kick? */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment