Commit 3615d573 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Code formattin

parent bda347c9
......@@ -1324,10 +1324,10 @@ void engine_addtasks_send_hydro(struct engine *e, struct cell *ci,
/* Create the tasks and their dependencies? */
if (t_xv == NULL) {
t_xv = scheduler_addtask(s, task_type_send, task_subtype_xv,
ci->tag, 0, ci, cj);
t_rho = scheduler_addtask(s, task_type_send, task_subtype_rho,
ci->tag, 0, ci, cj);
t_xv = scheduler_addtask(s, task_type_send, task_subtype_xv, ci->tag, 0,
ci, cj);
t_rho = scheduler_addtask(s, task_type_send, task_subtype_rho, ci->tag, 0,
ci, cj);
#ifdef EXTRA_HYDRO_LOOP
t_gradient = scheduler_addtask(s, task_type_send, task_subtype_gradient,
ci->tag, 0, ci, cj);
......@@ -1413,8 +1413,8 @@ void engine_addtasks_send_gravity(struct engine *e, struct cell *ci,
/* Create the tasks and their dependencies? */
if (t_grav == NULL) {
t_grav = scheduler_addtask(s, task_type_send, task_subtype_gpart,
ci->tag, 0, ci, cj);
t_grav = scheduler_addtask(s, task_type_send, task_subtype_gpart, ci->tag,
0, ci, cj);
/* The sends should unlock the down pass. */
scheduler_addunlock(s, t_grav, ci->super_gravity->grav_down);
......@@ -1473,8 +1473,8 @@ void engine_addtasks_send_timestep(struct engine *e, struct cell *ci,
/* Create the tasks and their dependencies? */
if (t_ti == NULL) {
t_ti = scheduler_addtask(s, task_type_send, task_subtype_tend,
ci->tag, 0, ci, cj);
t_ti = scheduler_addtask(s, task_type_send, task_subtype_tend, ci->tag, 0,
ci, cj);
/* The super-cell's timestep task should unlock the send_ti task. */
scheduler_addunlock(s, ci->super->timestep, t_ti);
......@@ -1515,10 +1515,10 @@ void engine_addtasks_recv_hydro(struct engine *e, struct cell *c,
if (t_xv == NULL && c->density != NULL) {
/* Create the tasks. */
t_xv = scheduler_addtask(s, task_type_recv, task_subtype_xv, c->tag,
0, c, NULL);
t_rho = scheduler_addtask(s, task_type_recv, task_subtype_rho,
c->tag, 0, c, NULL);
t_xv = scheduler_addtask(s, task_type_recv, task_subtype_xv, c->tag, 0, c,
NULL);
t_rho = scheduler_addtask(s, task_type_recv, task_subtype_rho, c->tag, 0, c,
NULL);
#ifdef EXTRA_HYDRO_LOOP
t_gradient = scheduler_addtask(s, task_type_recv, task_subtype_gradient,
c->tag, 0, c, NULL);
......@@ -1576,8 +1576,8 @@ void engine_addtasks_recv_gravity(struct engine *e, struct cell *c,
if (t_grav == NULL && c->grav != NULL) {
/* Create the tasks. */
t_grav = scheduler_addtask(s, task_type_recv, task_subtype_gpart,
c->tag, 0, c, NULL);
t_grav = scheduler_addtask(s, task_type_recv, task_subtype_gpart, c->tag, 0,
c, NULL);
}
c->recv_grav = t_grav;
......@@ -1612,8 +1612,8 @@ void engine_addtasks_recv_timestep(struct engine *e, struct cell *c,
/* Have we reached a level where there are any self/pair tasks ? */
if (t_ti == NULL && (c->grav != NULL || c->density != NULL)) {
t_ti = scheduler_addtask(s, task_type_recv, task_subtype_tend,
c->tag, 0, c, NULL);
t_ti = scheduler_addtask(s, task_type_recv, task_subtype_tend, c->tag, 0, c,
NULL);
}
c->recv_ti = t_ti;
......@@ -4793,7 +4793,7 @@ void engine_step(struct engine *e) {
if (e->verbose) engine_print_task_counts(e);
/* Dump local cells and active particle counts. */
//dumpCells("cells", 1, 0, 0, 0, e->s, e->nodeID, e->step);
// dumpCells("cells", 1, 0, 0, 0, e->s, e->nodeID, e->step);
#ifdef SWIFT_DEBUG_CHECKS
/* Check that we have the correct total mass in the top-level multipoles */
......
......@@ -1563,26 +1563,26 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
t->subtype == task_subtype_rho ||
t->subtype == task_subtype_gradient) {
err = MPI_Irecv(t->ci->parts, t->ci->count, part_mpi_type,
t->ci->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
t->ci->nodeID, t->flags, subtaskMPI_comms[t->subtype],
&t->req);
// message( "receiving %i parts with tag=%i from %i to %i." ,
// t->ci->count , t->flags , t->ci->nodeID , s->nodeID );
// fflush(stdout);
} else if (t->subtype == task_subtype_gpart) {
err = MPI_Irecv(t->ci->gparts, t->ci->gcount, gpart_mpi_type,
t->ci->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
t->ci->nodeID, t->flags, subtaskMPI_comms[t->subtype],
&t->req);
} else if (t->subtype == task_subtype_spart) {
err = MPI_Irecv(t->ci->sparts, t->ci->scount, spart_mpi_type,
t->ci->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
t->ci->nodeID, t->flags, subtaskMPI_comms[t->subtype],
&t->req);
} else if (t->subtype == task_subtype_multipole) {
t->buff = (struct gravity_tensors *)malloc(
sizeof(struct gravity_tensors) * t->ci->pcell_size);
err = MPI_Irecv(
t->buff, sizeof(struct gravity_tensors) * t->ci->pcell_size,
MPI_BYTE, t->ci->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
err = MPI_Irecv(t->buff,
sizeof(struct gravity_tensors) * t->ci->pcell_size,
MPI_BYTE, t->ci->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
} else {
error("Unknown communication sub-type");
}
......@@ -1602,15 +1602,15 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
cell_pack_end_step(t->ci, (struct pcell_step *)t->buff);
if ((t->ci->pcell_size * sizeof(struct pcell_step)) >
s->mpi_message_limit)
err = MPI_Isend(
t->buff, t->ci->pcell_size * sizeof(struct pcell_step),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
err = MPI_Isend(t->buff,
t->ci->pcell_size * sizeof(struct pcell_step),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
else
err = MPI_Issend(
t->buff, t->ci->pcell_size * sizeof(struct pcell_step),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
err = MPI_Issend(t->buff,
t->ci->pcell_size * sizeof(struct pcell_step),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
} else if (t->subtype == task_subtype_xv ||
t->subtype == task_subtype_rho ||
t->subtype == task_subtype_gradient) {
......@@ -1647,10 +1647,10 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
t->buff = (struct gravity_tensors *)malloc(
sizeof(struct gravity_tensors) * t->ci->pcell_size);
cell_pack_multipoles(t->ci, (struct gravity_tensors *)t->buff);
err = MPI_Isend(
t->buff, t->ci->pcell_size * sizeof(struct gravity_tensors),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
err = MPI_Isend(t->buff,
t->ci->pcell_size * sizeof(struct gravity_tensors),
MPI_BYTE, t->cj->nodeID, t->flags,
subtaskMPI_comms[t->subtype], &t->req);
} else {
error("Unknown communication sub-type");
}
......
......@@ -501,4 +501,3 @@ void task_create_mpi_comms(void) {
}
}
#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