Commit 4dd8cea4 authored by Peter W. Draper's avatar Peter W. Draper
Browse files

Add a few missing struct statements

parent 085f82c1
......@@ -442,7 +442,7 @@ static void pick_metis(struct space *s, int nregions, double *vertexw,
* of old and new ranks. Each element of the array has a cell count and
* an unique index so we can sort into decreasing counts. */
int indmax = nregions * nregions;
struct indexval *ivs = (indexval *)malloc(sizeof(struct indexval) * indmax);
struct indexval *ivs = (struct indexval *)malloc(sizeof(struct indexval) * indmax);
bzero(ivs, sizeof(struct indexval) * indmax);
for (int k = 0; k < ncells; k++) {
int index = regionid[k] + nregions * s->cells_top[k].nodeID;
......
......@@ -2002,7 +2002,7 @@ void *runner_main(void *data) {
break;
case task_type_recv:
if (t->subtype == task_subtype_tend) {
cell_unpack_end_step(ci, (pcell_step *)t->buff);
cell_unpack_end_step(ci, (struct pcell_step *)t->buff);
free(t->buff);
} else if (t->subtype == task_subtype_xv) {
runner_do_recv_part(r, ci, 1, 1);
......@@ -2015,7 +2015,7 @@ void *runner_main(void *data) {
} else if (t->subtype == task_subtype_spart) {
runner_do_recv_spart(r, ci, 1);
} else if (t->subtype == task_subtype_multipole) {
cell_unpack_multipoles(ci, (gravity_tensors *)t->buff);
cell_unpack_multipoles(ci, (struct gravity_tensors *)t->buff);
free(t->buff);
} else {
error("Unknown/invalid task subtype (%d).", t->subtype);
......
......@@ -1501,7 +1501,7 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
#ifdef WITH_MPI
if (t->subtype == task_subtype_tend) {
t->buff = (struct pcell_step *)malloc(sizeof(struct pcell_step) * t->ci->pcell_size);
cell_pack_end_step(t->ci, (pcell_step *)t->buff);
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(
......@@ -1539,7 +1539,7 @@ void scheduler_enqueue(struct scheduler *s, struct task *t) {
t->cj->nodeID, t->flags, MPI_COMM_WORLD, &t->req);
} else if (t->subtype == task_subtype_multipole) {
t->buff = (struct gravity_tensors *)malloc(sizeof(struct gravity_tensors) * t->ci->pcell_size);
cell_pack_multipoles(t->ci, (gravity_tensors *)t->buff);
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, MPI_COMM_WORLD, &t->req);
......
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