diff --git a/src/cell.h b/src/cell.h index a026a04fc135ba3c1a1437c78f129c50ea226dbd..b13889abda54f77ec2030bf2262dca30440bdc4e 100644 --- a/src/cell.h +++ b/src/cell.h @@ -594,9 +594,6 @@ struct cell { /* Task receiving hydro data (gradient). */ struct task *recv_gradient; - /* Task receiving hydro data (force). */ - struct task *recv_force; - /* Linked list for sending hydro data (positions). */ struct link *send_xv; @@ -606,9 +603,6 @@ struct cell { /* Linked list for sending hydro data (gradient). */ struct link *send_gradient; - /* Linked list for sending hydro data (force). */ - struct link *send_force; - } hydro; struct { diff --git a/src/drift.h b/src/drift.h index 477ec789c845864b1372cd72b6e3d9c1ec269994..7e874fe0ceabe5b091cc7c5bb53adbef2c9a3efd 100644 --- a/src/drift.h +++ b/src/drift.h @@ -85,7 +85,7 @@ __attribute__((always_inline)) INLINE static void drift_part( p->ti_drift = ti_current; #endif - + /* Drift... */ p->x[0] += xp->v_full[0] * dt_drift; p->x[1] += xp->v_full[1] * dt_drift; diff --git a/src/engine_maketasks.c b/src/engine_maketasks.c index 26c60e4bfe7df0afa0fcea72be91034ab48acb4b..6340cb17eb574822957aa4a7e6180cda9a14b5d7 100644 --- a/src/engine_maketasks.c +++ b/src/engine_maketasks.c @@ -120,8 +120,7 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci, */ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, struct cell *cj, struct task *t_xv, - struct task *t_rho, struct task *t_gradient, - struct task *t_force) { + struct task *t_rho, struct task *t_gradient) { #ifdef WITH_MPI struct link *l = NULL; @@ -153,9 +152,6 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, ci->mpi.tag, 0, ci, cj); #endif - /* t_force = scheduler_addtask(s, task_type_send, task_subtype_force, */ - /* ci->mpi.tag, 0, ci, cj); */ - #ifdef EXTRA_HYDRO_LOOP scheduler_addunlock(s, t_gradient, ci->hydro.super->hydro.end_force); @@ -184,8 +180,6 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, #endif - //scheduler_addunlock(s, ci->hydro.super->hydro.end_force, t_force); - //scheduler_addunlock(s, ci->hydro.super->hydro.drift, t_force); scheduler_addunlock(s, ci->hydro.super->hydro.drift, t_rho); /* Drift before you send */ @@ -198,7 +192,6 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, #ifdef EXTRA_HYDRO_LOOP engine_addlink(e, &ci->mpi.hydro.send_gradient, t_gradient); #endif - //engine_addlink(e, &ci->mpi.hydro.send_force, t_force); } /* Recurse? */ @@ -206,7 +199,7 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci, for (int k = 0; k < 8; k++) if (ci->progeny[k] != NULL) engine_addtasks_send_hydro(e, ci->progeny[k], cj, t_xv, t_rho, - t_gradient, t_force); + t_gradient); #else error("SWIFT was not compiled with MPI support."); @@ -365,7 +358,7 @@ void engine_addtasks_send_timestep(struct engine *e, struct cell *ci, */ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c, struct task *t_xv, struct task *t_rho, - struct task *t_gradient, struct task *t_force) { + struct task *t_gradient) { #ifdef WITH_MPI struct scheduler *s = &e->sched; @@ -387,21 +380,16 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c, t_gradient = scheduler_addtask(s, task_type_recv, task_subtype_gradient, c->mpi.tag, 0, c, NULL); #endif - - /* t_force = scheduler_addtask(s, task_type_recv, task_subtype_force, */ - /* c->mpi.tag, 0, c, NULL); */ } c->mpi.hydro.recv_xv = t_xv; c->mpi.hydro.recv_rho = t_rho; c->mpi.hydro.recv_gradient = t_gradient; - //c->mpi.hydro.recv_force = t_force; /* Add dependencies. */ if (c->hydro.sorts != NULL) { scheduler_addunlock(s, t_xv, c->hydro.sorts); scheduler_addunlock(s, c->hydro.sorts, t_rho); - //scheduler_addunlock(s, c->hydro.sorts, t_force); } for (struct link *l = c->hydro.density; l != NULL; l = l->next) { @@ -422,10 +410,7 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c, } #endif - /* for (struct link *l = c->hydro.force; l != NULL; l = l->next) { */ - /* scheduler_addunlock(s, l->t, t_force); */ - /* } */ - + /* Make sure the density has been computed before the stars compute theirs. */ for (struct link *l = c->stars.density; l != NULL; l = l->next) { scheduler_addunlock(s, t_rho, l->t); } @@ -434,8 +419,7 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c, if (c->split) for (int k = 0; k < 8; k++) if (c->progeny[k] != NULL) - engine_addtasks_recv_hydro(e, c->progeny[k], t_xv, t_rho, t_gradient, - t_force); + engine_addtasks_recv_hydro(e, c->progeny[k], t_xv, t_rho, t_gradient); #else error("SWIFT was not compiled with MPI support."); @@ -868,7 +852,7 @@ void engine_make_hierarchical_tasks_hydro(struct engine *e, struct cell *c) { if (with_stars) { c->stars.drift = scheduler_addtask(s, task_type_drift_spart, task_subtype_none, 0, 0, c, NULL); - scheduler_addunlock(s, c->stars.drift, c->super->kick2); + scheduler_addunlock(s, c->stars.drift, c->super->kick2); } /* Subgrid tasks: cooling */ @@ -2194,7 +2178,7 @@ void engine_addtasks_send_mapper(void *map_data, int num_elements, * connection. */ if ((e->policy & engine_policy_hydro) && (type & proxy_cell_type_hydro)) engine_addtasks_send_hydro(e, ci, cj, /*t_xv=*/NULL, - /*t_rho=*/NULL, /*t_gradient=*/NULL, NULL); + /*t_rho=*/NULL, /*t_gradient=*/NULL); /* Add the send tasks for the cells in the proxy that have a stars * connection. */ @@ -2226,7 +2210,7 @@ void engine_addtasks_recv_mapper(void *map_data, int num_elements, /* Add the recv tasks for the cells in the proxy that have a hydro * connection. */ if ((e->policy & engine_policy_hydro) && (type & proxy_cell_type_hydro)) - engine_addtasks_recv_hydro(e, ci, NULL, NULL, NULL, NULL); + engine_addtasks_recv_hydro(e, ci, NULL, NULL, NULL); /* Add the recv tasks for the cells in the proxy that have a stars * connection. */ diff --git a/src/error.h b/src/error.h index 6cd06863abff3778c855cc8c296b50372c6e0df3..d384ec56ba0dc3562160d94911e3e3d3bb786211 100644 --- a/src/error.h +++ b/src/error.h @@ -54,7 +54,7 @@ extern int engine_rank; fprintf(stderr, "[%04i] %s %s:%s():%i: " s "\n", engine_rank, \ clocks_get_timesincestart(), __FILE__, __FUNCTION__, __LINE__, \ ##__VA_ARGS__); \ - swift_abort(-1); \ + MPI_Abort(MPI_COMM_WORLD, -1); \ }) #else #define error(s, ...) \ diff --git a/src/runner.c b/src/runner.c index 60b06eefd04aee4549a71861c98b8ecccc528d89..fd054184ac885f4db41d2a6deaf8b4033e962633 100644 --- a/src/runner.c +++ b/src/runner.c @@ -931,7 +931,7 @@ void runner_do_hydro_sort(struct runner *r, struct cell *c, int flags, /* Fill the sort array. */ for (int k = 0; k < count; k++) { - const double px[3] = {parts[k].x[0], parts[k].x[1], parts[k].x[2]}; + const double px[3] = {parts[k].x[0], parts[k].x[1], parts[k].x[2]}; for (int j = 0; j < 13; j++) if (flags & (1 << j)) { c->hydro.sort[j][k].i = k; @@ -3273,7 +3273,7 @@ void *runner_main(void *data) { break; #endif case task_type_stars_ghost: - runner_do_stars_ghost(r, ci, 1); + runner_do_stars_ghost(r, ci, 1); break; case task_type_drift_part: runner_do_drift_part(r, ci, 1); @@ -3322,7 +3322,7 @@ void *runner_main(void *data) { } else if (t->subtype == task_subtype_gradient) { runner_do_recv_part(r, ci, 0, 1); } else if (t->subtype == task_subtype_force) { - error("oo");runner_do_recv_part(r, ci, 0, 1); + runner_do_recv_part(r, ci, 0, 1); } else if (t->subtype == task_subtype_limiter) { runner_do_recv_part(r, ci, 0, 1); } else if (t->subtype == task_subtype_gpart) { diff --git a/src/space.c b/src/space.c index 2a7891ca35c3f0312b149947416ab645ffd4b376..0d7621d4809662ec513c2717722d13871540470e 100644 --- a/src/space.c +++ b/src/space.c @@ -275,7 +275,6 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements, c->mpi.hydro.recv_xv = NULL; c->mpi.hydro.recv_rho = NULL; c->mpi.hydro.recv_gradient = NULL; - c->mpi.hydro.recv_force = NULL; c->mpi.grav.recv = NULL; c->mpi.stars.recv = NULL; c->mpi.recv_ti = NULL; @@ -284,7 +283,6 @@ void space_rebuild_recycle_mapper(void *map_data, int num_elements, c->mpi.hydro.send_xv = NULL; c->mpi.hydro.send_rho = NULL; c->mpi.hydro.send_gradient = NULL; - c->mpi.hydro.send_force = NULL; c->mpi.grav.send = NULL; c->mpi.stars.send = NULL; c->mpi.send_ti = NULL; @@ -552,11 +550,9 @@ void space_regrid(struct space *s, int verbose) { c->mpi.hydro.recv_xv = NULL; c->mpi.hydro.recv_rho = NULL; c->mpi.hydro.recv_gradient = NULL; - c->mpi.hydro.recv_force = NULL; c->mpi.hydro.send_xv = NULL; c->mpi.hydro.send_rho = NULL; c->mpi.hydro.send_gradient = NULL; - c->mpi.hydro.send_force = NULL; c->mpi.stars.send = NULL; c->mpi.stars.recv = NULL; c->mpi.grav.recv = NULL; diff --git a/src/task.c b/src/task.c index 2257ed6f9ca84f956adb1adfc555dfdca6badb0b..34c636b48ed6ff3fefdf1e7847a67ca56ea79c89 100644 --- a/src/task.c +++ b/src/task.c @@ -688,11 +688,7 @@ void task_get_group_name(int type, int subtype, char *cluster) { } break; case task_subtype_force: - if (type == task_type_send || type == task_type_recv) { - strcpy(cluster, "None"); - } else { - strcpy(cluster, "Force"); - } + strcpy(cluster, "Force"); break; case task_subtype_grav: strcpy(cluster, "Gravity");