Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
4dd8cea4
Commit
4dd8cea4
authored
Feb 23, 2018
by
Peter W. Draper
Browse files
Add a few missing struct statements
parent
085f82c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/partition.c
View file @
4dd8cea4
...
...
@@ -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
;
...
...
src/runner.c
View file @
4dd8cea4
...
...
@@ -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
);
...
...
src/scheduler.c
View file @
4dd8cea4
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment