Skip to content
Snippets Groups Projects
Commit 9b262cc3 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Handle drift and kick tasks in partition weights

parent 56fcc973
No related branches found
No related tags found
2 merge requests!136Master,!76Add new initial partition schemes and extend repartition ones.
...@@ -372,7 +372,8 @@ void engine_repartition(struct engine *e) { ...@@ -372,7 +372,8 @@ void engine_repartition(struct engine *e) {
/* Skip un-interesting tasks. */ /* Skip un-interesting tasks. */
if (t->type != task_type_self && t->type != task_type_pair && if (t->type != task_type_self && t->type != task_type_pair &&
t->type != task_type_sub && t->type != task_type_ghost && t->type != task_type_sub && t->type != task_type_ghost &&
t->type != task_type_kick1 && t->type != task_type_kick2) t->type != task_type_drift && t->type != task_type_kick &&
t->type != task_type_init)
continue; continue;
/* Get the task weight. */ /* Get the task weight. */
...@@ -403,8 +404,8 @@ void engine_repartition(struct engine *e) { ...@@ -403,8 +404,8 @@ void engine_repartition(struct engine *e) {
int cid = ci - cells; int cid = ci - cells;
/* Different weights for different tasks. */ /* Different weights for different tasks. */
if (t->type == task_type_ghost || t->type == task_type_kick1 || if (t->type == task_type_ghost || t->type == task_type_drift ||
t->type == task_type_kick2) { t->type == task_type_kick) {
/* Particle updates add only to vertex weight. */ /* Particle updates add only to vertex weight. */
weights_v[cid] += w; weights_v[cid] += w;
...@@ -1971,7 +1972,7 @@ void engine_makeproxies(struct engine *e) { ...@@ -1971,7 +1972,7 @@ void engine_makeproxies(struct engine *e) {
* @param grid The grid. * @param grid The grid.
*/ */
void engine_split(struct engine *e, int *grid) { void engine_split(struct engine *e, struct initpart *ipart) {
#ifdef WITH_MPI #ifdef WITH_MPI
...@@ -2115,6 +2116,7 @@ void engine_split(struct engine *e, int *grid) { ...@@ -2115,6 +2116,7 @@ void engine_split(struct engine *e, int *grid) {
free(s->xparts); free(s->xparts);
s->parts = parts_new; s->parts = parts_new;
s->xparts = xparts_new; s->xparts = xparts_new;
#endif
} }
#if defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE) #if defined(HAVE_LIBNUMA) && defined(_GNU_SOURCE)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment